From 5e72e706530608bcf9c61dd3d79e6c51ee835f21 Mon Sep 17 00:00:00 2001 From: Samuel De Backer Date: Tue, 9 Jan 2018 11:01:55 +0100 Subject: [PATCH] Route methods chaining --- src/Providers/RouteServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Providers/RouteServiceProvider.php b/src/Providers/RouteServiceProvider.php index d448bb1..46b5e26 100644 --- a/src/Providers/RouteServiceProvider.php +++ b/src/Providers/RouteServiceProvider.php @@ -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 @@ -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');