whereNull('user_id')->delete(); }); DB::transaction(function() { $ts = now()->subMonths(3)->timestamp; DB::table('sessions')->where('last_activity', '<', $ts)->delete(); }); return Command::SUCCESS; } }