当我在应用了前缀的组路由下使用route :: resource时,我得到一个“RouteNotFoundException”
例如我有这个
/// ROUTES FILE
$languages = array('gr','en');
$locale = \Request::segment(1);
if(in_array($locale, $languages)){
\App::setLocale($locale);
}else{
$locale = null;
App::setLocale("gr");
}
Route::group(array('before'=>'auth','domain' => 'app.domain.dev','prefix'=>"$locale"), function(){
Route::resource('invoices', '\ctrl\app\InvoicesController');
});
我收到此错误
Symfony \ Component \ Routing \ Exception \ RouteNotFoundException 无法为命名路由“invoices.index”生成URL 路线不存在。