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 6abe13b commit 5e72e70
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('places', 'AdminController@index')->name('admin::index-places')->middleware('can:see-all-places');
$router->get('places/create', 'AdminController@create')->name('admin::create-place')->middleware('can:create-place');
$router->get('places/{place}/edit', 'AdminController@edit')->name('admin::edit-place')->middleware('can:update-place');
Expand Down

0 comments on commit 5e72e70

Please sign in to comment.