在我route.php我有这样的代码Laravel 5.2路由/ HREF
Route::group(array('prefix' => 'athlete'), function() {
Route::get('test', '[email protected]')->name('test');
});
在我的控制器AthleteController
public function index()
{
return view('Frontend/views/athlete/profil');
}
在我看来,我创建的href,而不是工作
<a href="{{route('test')}}">Test</a>
我有这个错误:
c8dad5722499b68e914f212daece129d539cff9e.php中的FatalErrorException第100行:语法错误,意外的'test'(T_STRING),期待','或';'
我使用Laravel 5.2
你可以添加你的整个视图,以及如何从控制器方法加载它?这段代码没问题,但可能还有其他的东西会产生这个错误。 – TheFallen
运行'php artisan route:list'并检查您的路由是如何发布的。 – Pyton
这不是一个路线问题,因为@TheFallen提到,可能该视图有一些遗漏的结束''报价 –