]> BookStack Code Mirror - bookstack/blob - app/Providers/RouteServiceProvider.php
Update french translasion
[bookstack] / app / Providers / RouteServiceProvider.php
1 <?php
2
3 namespace BookStack\Providers;
4
5 use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
6 use Route;
7
8 class RouteServiceProvider extends ServiceProvider
9 {
10     /**
11      * This namespace is applied to the controller routes in your routes file.
12      *
13      * In addition, it is set as the URL generator's root namespace.
14      *
15      * @var string
16      */
17     protected $namespace = 'BookStack\Http\Controllers';
18
19     /**
20      * Define your route model bindings, pattern filters, etc.
21      *
22      * @return void
23      */
24     public function boot()
25     {
26         parent::boot();
27     }
28
29     /**
30      * Define the routes for the application.
31      *
32      * @return void
33      */
34     public function map()
35     {
36         $this->mapWebRoutes();
37 //        $this->mapApiRoutes();
38     }
39     /**
40      * Define the "web" routes for the application.
41      *
42      * These routes all receive session state, CSRF protection, etc.
43      *
44      * @return void
45      */
46     protected function mapWebRoutes()
47     {
48         Route::group([
49             'middleware' => 'web',
50             'namespace' => $this->namespace,
51         ], function ($router) {
52             require base_path('routes/web.php');
53         });
54     }
55     /**
56      * Define the "api" routes for the application.
57      *
58      * These routes are typically stateless.
59      *
60      * @return void
61      */
62     protected function mapApiRoutes()
63     {
64         Route::group([
65             'middleware' => 'api',
66             'namespace' => $this->namespace,
67             'prefix' => 'api',
68         ], function ($router) {
69             require base_path('routes/api.php');
70         });
71     }
72 }