namespace App\Http\Controllers;
use App\Repositories\CampaignpostRepository;
use App\Models\User;
use Illuminate\Exception\Handler;
use DB;
class CampaignpostController extends Controller {
protected $campaign_gestion;
/**
* Store a new user.
*
* @param Request $request
* @return Response
*/
public function __construct(
CampaignpostRepository $campaign_gestion)
{
$this->campaign_gestion = $campaign_gestion;
}
public function index()
{
}
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
$schedule->command('CampaignpostController@index')->everyMinute();
}
我需要从kernal.php文件中调用CampaignpostController 我该如何调用CampaignpostController。
答案 0 :(得分:0)
试试这个
protected function schedule(Schedule $schedule)
{
$schedule->call('CampaignpostController@index')->everyMinute();
}