]> BookStack Code Mirror - bookstack/blobdiff - app/Providers/RouteServiceProvider.php
Fixes for CodeStyle vol.2
[bookstack] / app / Providers / RouteServiceProvider.php
index c4c39d5345fa74b80631c7e737e4f928407f32a9..8f0dab400c7efd4ce00902d7ef94874a654e516e 100644 (file)
@@ -34,8 +34,9 @@ class RouteServiceProvider extends ServiceProvider
     public function map()
     {
         $this->mapWebRoutes();
-//        $this->mapApiRoutes();
+        $this->mapApiRoutes();
     }
+
     /**
      * Define the "web" routes for the application.
      *
@@ -47,11 +48,12 @@ class RouteServiceProvider extends ServiceProvider
     {
         Route::group([
             'middleware' => 'web',
-            'namespace' => $this->namespace,
+            'namespace'  => $this->namespace,
         ], function ($router) {
             require base_path('routes/web.php');
         });
     }
+
     /**
      * Define the "api" routes for the application.
      *
@@ -63,8 +65,8 @@ class RouteServiceProvider extends ServiceProvider
     {
         Route::group([
             'middleware' => 'api',
-            'namespace' => $this->namespace,
-            'prefix' => 'api',
+            'namespace'  => $this->namespace . '\Api',
+            'prefix'     => 'api',
         ], function ($router) {
             require base_path('routes/api.php');
         });