当我在shell中使用raw查询时,我正在使用laravel Query Builder连接mysql数据库中的两个表LEFT JOIN child_accountson parent_accounts.account_id=child_accounts.parent_id
使用laravel查询构建器时,如下所示
$accounts=\DB::table('parent_accounts as p
有没有人可以告诉我,为什么我不能选择部分从节表使用左连接。我想在一个表中的教师列表,我能够访问教师表中的所有数据,但我不能看到部分使用左连接。教师表有section_id列,它应该访问sections列上sections表的数据。 现在,当我尝试在视图中获取数据时,它给出了错误,下面是我的代码{{$teacher->section}}。public function listteachers(