Skip to content

Commit

Permalink
Fix route permission middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
dfox288 committed Mar 23, 2021
1 parent 5177601 commit d0838a1
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,29 @@
'navigation'
]
], function () {
Route::resource('projects', 'ProjectsController');
Route::resource('websites', 'WebsitesController');
Route::resource('apps', 'AppsController');
Route::group([ 'middleware' => [ 'permission' ] ], static function () {
Route::resource('projects', 'ProjectsController');
Route::resource('websites', 'WebsitesController');
Route::resource('apps', 'AppsController');

Route::resource('project_navigations', 'ProjectNavigationsController', ['except' => [
'index', 'create'
]]);
Route::resource('project_navigations', 'ProjectNavigationsController', [
'except' => [
'index',
'create'
]
]);

Route::get('project_navigations/{project_navigation}', 'ProjectNavigationsController@index')->name('project_navigations.index');
Route::get('project_navigations/{project_navigation}/create', 'ProjectNavigationsController@create')->name('project_navigations.create');
Route::get('project_navigations/{project_navigation}', 'ProjectNavigationsController@index')
->name('project_navigations.index');
Route::get('project_navigations/{project_navigation}/create', 'ProjectNavigationsController@create')
->name('project_navigations.create');

Route::resource('project_navigation_trees', 'ProjectNavigationTreesController', ['parameters' => [
'project_navigation_trees' => 'project_navigation'
]]);
Route::get('project_navigation_trees/{project_navigation}/duplicate',
'ProjectNavigationTreesController@duplicate')->name('project_navigation_trees.duplicate');
});
Route::resource('project_navigation_trees', 'ProjectNavigationTreesController', [
'parameters' => [
'project_navigation_trees' => 'project_navigation'
]
]);
Route::get('project_navigation_trees/{project_navigation}/duplicate',
'ProjectNavigationTreesController@duplicate')->name('project_navigation_trees.duplicate');
}
});

0 comments on commit d0838a1

Please sign in to comment.