2013-06-06 28 views
2

如何從命名路線中刪除索引?命名路線包含索引

//routes 
Route::group(array('prefix' => 'reports/finance'), function() 
{ 

    Route::controller('/', 'Reports\Finance\HomeController', ['getIndex' => 'reports.finance']); 

}); 


//view 
{{ HTML::linkRoute('reports.finance', 'admin', ['captial-admin']) }} 

它生成的網址 -

/reports/finance/index/captial-admin 

我什麼之後 -

/reports/finance/captial-admin 

回答

0

您可以檢查您的應用程序的 '網址'/配置/ app.php如果那裏有'索引'?

+0

theres no index there ...我不確定它可以在不修改核心的情況下完成嗎?它相當煩人:( – mybigman

0

你可以在你的路線定義中更加明確。

Route::group(['prefix' => 'foo'], function(){ 
    Route::get('bar/baz', ['uses' => '[email protected]', 'as' => 'route.name']); 
}); 

節拍編輯核心。