3 namespace BookStack\Providers;
5 use Illuminate\Routing\Router;
6 use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
9 class RouteServiceProvider extends ServiceProvider
12 * This namespace is applied to the controller routes in your routes file.
14 * In addition, it is set as the URL generator's root namespace.
18 protected $namespace = 'BookStack\Http\Controllers';
21 * Define your route model bindings, pattern filters, etc.
25 public function boot()
31 * Define the routes for the application.
37 $this->mapWebRoutes();
38 // $this->mapApiRoutes();
41 * Define the "web" routes for the application.
43 * These routes all receive session state, CSRF protection, etc.
47 protected function mapWebRoutes()
50 'middleware' => 'web',
51 'namespace' => $this->namespace,
52 ], function ($router) {
53 require base_path('routes/web.php');
57 * Define the "api" routes for the application.
59 * These routes are typically stateless.
63 protected function mapApiRoutes()
66 'middleware' => 'api',
67 'namespace' => $this->namespace,
69 ], function ($router) {
70 require base_path('routes/api.php');