laravel框架通过id查询多条数据

代码:

$huabei = AllSchool::where(['status'=>1])
    ->whereIn('allSchool_id',[20,22,36,38,44,47,55])
    ->get()
    ->toArray();

查询多条数据可以使用whereIn

猜你喜欢

转载自blog.csdn.net/weixin_45849851/article/details/103347116
今日推荐