Using Laravel 4.2, is it possible to assign a name to a resource controller route? My route is defined as follows:
Route::resource('faq', 'ProductFaqController');
I tried adding a name option to the route like this:
Route::resource('faq', 'ProductFaqController', array("as"=>"faq"));
However, when I hit the /faq route and place {{ Route::currentRouteName() }}
in my view, it yields faq.faq.index
instead of just faq
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…