0
|
1 |
<?php namespace TestCAS\Providers; |
|
2 |
|
|
3 |
use Illuminate\Routing\Router; |
|
4 |
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
|
5 |
|
|
6 |
class RouteServiceProvider extends ServiceProvider |
|
7 |
{ |
|
8 |
/** |
|
9 |
* This namespace is applied to the controller routes in your routes file. |
|
10 |
* |
|
11 |
* In addition, it is set as the URL generator's root namespace. |
|
12 |
* |
|
13 |
* @var string |
|
14 |
*/ |
|
15 |
protected $namespace = 'TestCAS\Http\Controllers'; |
|
16 |
|
|
17 |
/** |
|
18 |
* Define your route model bindings, pattern filters, etc. |
|
19 |
* |
|
20 |
* @param \Illuminate\Routing\Router $router |
|
21 |
* @return void |
|
22 |
*/ |
|
23 |
public function boot(Router $router) |
|
24 |
{ |
|
25 |
parent::boot($router); |
|
26 |
|
|
27 |
// |
|
28 |
} |
|
29 |
|
|
30 |
/** |
|
31 |
* Define the routes for the application. |
|
32 |
* |
|
33 |
* @param \Illuminate\Routing\Router $router |
|
34 |
* @return void |
|
35 |
*/ |
|
36 |
public function map(Router $router) |
|
37 |
{ |
|
38 |
$router->group(['namespace' => $this->namespace], function ($router) { |
|
39 |
require app_path('Http/routes.php'); |
|
40 |
}); |
|
41 |
} |
|
42 |
} |