Hi,
Today, i we will show you WhereBetween query example in laravel. This article will give you simple example of WhereBetween query example in laravel. you will WhereBetween query example in laravel. So let’s follow few step to create example of WhereBetween query example in laravel.
Example: 1
/** * The attributes that are mass assignable. * * @var array */ public function index() { $users = DB::table('users') ->whereBetween('created_at',['2019-12-25','2019-12-30'] ) ->get(); dd($users); }
Example: 2
/** * The attributes that are mass assignable. * * @var array */ public function index() { $users = DB::table('users') ->whereBetween('age',[21,30] ) ->get(); dd($users); }
I hope it will assist you…