subDays(30)->toDateTimeString(); $count = $model->where('requested_at <', $threshold)->delete(); CLI::write("Deleted $count old password reset request(s).", 'green'); } } /* Add this cron job to run every 24hrs 0 0 * * * /usr/bin/php /path/to/project/public/index.php cleanup:password-resets >> /path/to/project/writable/logs/cleanup.log 2>&1 */