Laravel5.5. whereIn 报错?
Tag::whereIn('name',['laravel','php'])->pluck('id');
ErrorException(E_WARNING)
array_flip() expects parameter 1 to be array, string given
使用
\DB::table('tags')->whereIn('name',['laravel','php'])->pluck('id')
就不会报错,求大神指导!
推荐文章: