From 1ea261cdb511067b4867bec3620a3fd4d194528b Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Thu, 9 Feb 2017 17:35:53 +0000 Subject: [PATCH] Updating the service providers --- src/MediaServiceProvider.php | 2 -- src/Providers/AuthorizationServiceProvider.php | 2 +- src/Providers/RouteServiceProvider.php | 17 ++++++----------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/MediaServiceProvider.php b/src/MediaServiceProvider.php index acea9d3..c84ce08 100644 --- a/src/MediaServiceProvider.php +++ b/src/MediaServiceProvider.php @@ -1,7 +1,6 @@ registerConfig(); $this->registerSidebarItems(); $this->registerProviders([ - CoreServiceProvider::class, Providers\PackagesServiceProvider::class, Providers\AuthorizationServiceProvider::class, ]); diff --git a/src/Providers/AuthorizationServiceProvider.php b/src/Providers/AuthorizationServiceProvider.php index 56141b0..5b32743 100644 --- a/src/Providers/AuthorizationServiceProvider.php +++ b/src/Providers/AuthorizationServiceProvider.php @@ -1,6 +1,6 @@ mapAdminRoutes($router); + $this->mapAdminRoutes(); } /* ------------------------------------------------------------------------------------------------ @@ -32,10 +29,8 @@ public function map(Router $router) */ /** * Register the admin routes. - * - * @param \Illuminate\Contracts\Routing\Registrar $router */ - private function mapAdminRoutes(Router $router) + private function mapAdminRoutes() { $attributes = $this->getAdminAttributes( 'media.', @@ -43,9 +38,9 @@ private function mapAdminRoutes(Router $router) $this->config()->get('arcanesoft.media.route.prefix', 'media') ); - $router->group($attributes, function ($router) { - Routes\Admin\MediaRoutes::register($router); - Routes\Admin\ApiRoutes::register($router); // TODO: Adding `api` or `ajax` middleware ? + $this->group($attributes, function () { + Routes\Admin\MediaRoutes::register(); + Routes\Admin\ApiRoutes::register(); // TODO: Adding `api` or `ajax` middleware ? }); } }