1$schedule->call(function () {
2 DB::table('users')->whereYear('last_login_at','<',date('Y')-1)->delete();
3 })->daily();
1//App\Console\Kernel
2
3protected function schedule(Schedule $schedule)
4 {
5 $schedule->call(function () {
6 DB::table('recent_users')->delete();
7 })->daily();
8 }