Laravel语法错误,意外'路线'(T_STRING)
问题描述:
我试图翻译所有路线。我正在使用mcamara/laravel-localization软件包。我的路线看起来像这样:Laravel语法错误,意外'路线'(T_STRING)
// Registration Routes...
Route::get(LaravelLocalization::transRoute('routes.register_link')/{plan?}, ['as' => 'auth.register', 'uses' => 'Auth\[email protected]']);
Route::post(LaravelLocalization::transRoute('routes.register_link'), ['as' => 'auth.register', 'uses' => 'Auth\[email protected]']);
,但我发现eror:
语法错误,意外 '{'
的哪些错误?感谢帮助家伙!
答
您可以从代码预览中看到颜色有问题。你有一个勾号(')中,你必须删除第一行...
答
有后进行额外的'
得到
Route::get(LaravelLocalization::transRoute('routes.register_link')/{plan?}', ['as' => 'auth.register', 'uses' => 'Auth\[email protected]']);
+0
哦,我的错。现在我得到语法错误,意外的'{',但一切看起来不错 –
[PHP解析/语法错误的可能的复制;和如何解决它们?](http://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) –