laravel all where code example
Example 1: laravel fillable
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'title',
'slug',
'body',
'image',
'published',
'comments_open'
];
Example 2: laravel where
$users = DB::table('users')
->whereMonth('created_at', '12')
->get();
Example 3: laravel where
$users = DB::table('users')
->whereDate('created_at', '2016-12-31')
->get();
Example 4: laravel find query
foreach (Flight::where('foo', 'bar')->cursor() as $flight) {
//
}