35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2024 http://www.tensent.cn All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
|
// +----------------------------------------------------------------------
|
|
namespace App\Http\Controllers\Admin\System;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Http\Controllers\BaseController;
|
|
use App\Traits\AdminController;
|
|
use App\Services\System\CrontabService;
|
|
|
|
class Crontab extends BaseController {
|
|
|
|
use AdminController;
|
|
protected $service = null;
|
|
|
|
public function __construct(CrontabService $service) {
|
|
$this->service = $service;
|
|
}
|
|
|
|
public function reload(Request $request){
|
|
try {
|
|
$this->data['data'] = $this->service->reload($request);
|
|
} catch (\Exception $e) {
|
|
$this->data['code'] = 0;
|
|
$this->data['message'] = $e->getMessage();
|
|
}
|
|
return $this->data;
|
|
}
|
|
}
|