3 namespace BookStack\Providers;
5 use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
8 class RouteServiceProvider extends ServiceProvider
11 * This namespace is applied to the controller routes in your routes file.
13 * In addition, it is set as the URL generator's root namespace.
17 protected $namespace = 'BookStack\Http\Controllers';
20 * Define your route model bindings, pattern filters, etc.
24 public function boot()
30 * Define the routes for the application.
36 $this->mapWebRoutes();
37 // $this->mapApiRoutes();
40 * Define the "web" routes for the application.
42 * These routes all receive session state, CSRF protection, etc.
46 protected function mapWebRoutes()
49 'middleware' => 'web',
50 'namespace' => $this->namespace,
51 ], function ($router) {
52 require base_path('routes/web.php');
56 * Define the "api" routes for the application.
58 * These routes are typically stateless.
62 protected function mapApiRoutes()
65 'middleware' => 'api',
66 'namespace' => $this->namespace,
68 ], function ($router) {
69 require base_path('routes/api.php');