/** * Execute the console command. * * @return mixed */ public function handle() { $this->info('Remove no longer used logs'); $difference = Carbon::parse("-1 months"); $logs = ApiLog::onlyTrashed()->where('deleted_at', '<', $difference)->latest()->forceDelete(); $this->info('Done!'); }