我尝试将laravel 5.0应用程序更新到5.7,并逐步移动,但由于错误我被停止了:
Call to undefined method Illuminate\Session\Store::getToken() (View: /var/www/html/YoutubeAPI_Demo-57/resources/views/videos.blade.php)
in HtmlServiceProvider.php line 51
at CompilerEngine->handleViewException(object(FatalThrowableError), 1)
我找到了文件:
vendor/illuminate/html/HtmlServiceProvider.php with method which triggered error:
/**
* Register the form builder instance.
*
* @return void
*/
protected function registerFormBuilder()
{
$this->app->singleton('form', function($app)
{
$form = new FormBuilder($app['html'], $app['url'], $app['session.store']->getToken());
return $form->setSessionStore($app['session.store']);
});
}
您能否提示如何解决此错误?
谢谢!
答案 0 :(得分:0)
尝试将getToken()
替换为token()