//SELECT t1.id,t1.article_name,t2.author_name FROM article as t1 LEFT JOIN author AS t2 ON t1.author_id=t2.id
$data=DB::table('article as t1')->select(DB::raw('t1.id,t1.article_name,t2.author_name'))
->leftJoin('author as t2','t1.author_id','=','t2.id')->get();
网友评论