get('key'); // Create validator for security key $validator = \Validator::make( array('cronkey' => $cronkeyRequest), array('cronkey' => 'required|alpha_num') ); if ($validator->passes()) { if ($cronkeyConfig === $cronkeyRequest) { \Artisan::call('cron:run', array()); } else { // Configured security key is not equals the sent security key \Log::error('Cron route call with wrong security key'); \App::abort(404); } } else { // Validation not passed \Log::error('Cron route call with missing or no alphanumeric security key'); \App::abort(404); } return; } }