PHP框架 Laravel Eloquent ORM where 多条件查询



 $goodsShow = Goods::where('product_id','=',$id)->first();

这个是 查询一个条件呢 我想在where 里面 在增加 几个条件 可以吗

有大神指点一下吗

laravel laravel查询 eloquent php laravel5

Zonlyx 9 years, 9 months ago

$goodsShow = Goods::where([product_id'=>$id,'name'=>$name])->first();

菟原手奈儿 answered 9 years, 9 months ago

Your Answer