Файл: app/Http/Controllers/CronjobController.php
Строк: 36
<?php
namespace AppHttpControllers;
use AppHttpRequestsProcessCronjobRequest;
use AppModelsSetting;
use IlluminateSupportCarbon;
use IlluminateSupportFacadesArtisan;
class CronjobController extends Controller
{
/**
* Run the scheduled cron job commands.
*
* @return IlluminateHttpJsonResponse
*/
public function index(ProcessCronjobRequest $request)
{
ini_set('max_execution_time', 0);
Artisan::call('schedule:run');
Setting::where('name', 'cronjob_executed_at')->update(['value' => Carbon::now()->timestamp]);
return response()->json([
'status' => 200
], 200);
}
}