Skip to content

Commit

Permalink
Route methods chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Jan 9, 2018
1 parent 0479840 commit c02ef31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class RouteServiceProvider extends ServiceProvider
*/
public function map()
{
Route::group(['namespace' => $this->namespace], function (Router $router) {
Route::namespace($this->namespace)->group(function (Router $router) {

/*
* Front office routes
Expand All @@ -43,7 +43,7 @@ public function map()
/*
* Admin routes
*/
$router->group(['middleware' => 'admin', 'prefix' => 'admin'], function (Router $router) {
$router->middleware('admin')->prefix('admin')->group(function (Router $router) {
$router->get('partners', 'AdminController@index')->name('admin::index-partners')->middleware('can:see-all-partners');
$router->get('partners/create', 'AdminController@create')->name('admin::create-partner')->middleware('can:create-partner');
$router->get('partners/{partner}/edit', 'AdminController@edit')->name('admin::edit-partner')->middleware('can:update-partner');
Expand Down

0 comments on commit c02ef31

Please sign in to comment.