如何正确分组路由?

时间:2019-01-31 22:52:24

标签: laravel-5.6

This image show my resource views and route我有路线,但是对它们进行分组后我无法访问页面

这是我的执法小组路线

Route :: prefix('admin')-> group(function(){

//Enforcement routes

Route :: resource('/ enforcements / islands','Frontend \ Enforcement \ IslandController');

Route :: resource('/ enforcements / methods','Frontend \ Enforcement \ MethodController');

Route :: resource('/ enforcements / fishedareas','Frontend \ Enforcement \ FishedAreaController');

Route :: resource('/ enforcements / offences','Frontend \ Enforcement \ OffenceController');

Route :: resource('/ enforcements / culprits','Frontend \ Enforcement \ CulpritController');

Route :: get('/ enforcements / treeviews','Frontend \ Enforcement \ TreeViewController @ index')-> name('treeviews.index');

Route :: get('/ enforcements / treeviews / {id?}','Frontend \ Enforcement \ TreeViewController @ create')-> name('treeviews.create');

Route :: post('/ enforcements / treeviews / {id?}','Frontend \ Enforcement \ TreeViewController @ store')-> name('treeviews.store');

Route :: resource('/ enforcements / show-trials','Frontend \ Enforcement \ CrimeController');

Route :: resource('/ enforcements / trials','Frontend \ Enforcement \ TrialController');

Route :: get('/ enforcements / trials / {id?}','Frontend \ Enforcement \ TrialController @ create')-> name('tests.create');

Route :: post('/ enforcements / trials / {id?}','Frontend \ Enforcement \ TrialController @ store')-> name('tests.store');

Route :: get('/ enforcements / trial / {id}','Frontend \ Enforcement \ TrialController @ downloadPDF')-> name('download.pdf');

//Login Route 

Route :: resource('/ enforcements / login','Frontend \ Enforcement \ AdminUserController');

});

如果我固定了此组路线,则可以查看页面

0 个答案:

没有答案