Answers for "laravel cronjob"

PHP
2

Laravel Scheduler

$schedule->call(function () {
            DB::table('users')->whereYear('last_login_at','<',date('Y')-1)->delete();
        })->daily();
Posted by: Guest on May-10-2020
0

laravel cronjob

//App\Console\Kernel

protected function schedule(Schedule $schedule)
    {
        $schedule->call(function () {
            DB::table('recent_users')->delete();
        })->daily();
    }
Posted by: Guest on June-21-2021

Browse Popular Code Answers by Language