namespace BookStack\Providers;
-use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
-use Route;
+use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
public function map()
{
$this->mapWebRoutes();
-// $this->mapApiRoutes();
+ $this->mapApiRoutes();
}
+
/**
* Define the "web" routes for the application.
*
{
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.
*
{
Route::group([
'middleware' => 'api',
- 'namespace' => $this->namespace,
- 'prefix' => 'api',
+ 'namespace' => $this->namespace . '\Api',
+ 'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});