In Laravel you can use "IN" query as
Using Eloquent
$data = YourModel::whereIn('id', array(1, 2, 3))->get();
Using DB Query builder
$data = DB::table('your_table')->whereIn('id', array(1, 2, 3))->get();
This post is submitted by one of our members. You may submit a new post here.
Laravel interview Questions © 2019 - Designed by PSD to HTML