| 1 | <?php |
||
| 9 | class MetadataRouteProvider extends ServiceProvider |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Bootstrap the application services. |
||
| 13 | * |
||
| 14 | * @return void |
||
| 15 | */ |
||
| 16 | public function boot() |
||
| 20 | |||
| 21 | private static function setupRoute() |
||
| 22 | { |
||
| 23 | $auth_middleware = self::getAuthMiddleware(); |
||
| 24 | |||
| 25 | Route::any( |
||
| 26 | 'odata.svc/{section}', |
||
| 27 | ['uses' => 'AlgoWeb\PODataLaravel\Controllers\ODataController@index', 'middleware' => $auth_middleware] |
||
| 28 | ) |
||
| 29 | ->where(['section' => '.*']); |
||
| 30 | Route::any( |
||
| 31 | 'odata.svc', |
||
| 32 | ['uses' => 'AlgoWeb\PODataLaravel\Controllers\ODataController@index', 'middleware' => $auth_middleware] |
||
| 33 | ); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Register the application services. |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | public function register() |
||
| 45 | |||
| 46 | private static function getAuthMiddleware() |
||
| 59 | } |
||
| 60 |