server/src/app/Http/routes.php
changeset 280 59a2c10ac9b8
parent 279 5d2621f71f39
child 282 9f8355f119e7
equal deleted inserted replaced
279:5d2621f71f39 280:59a2c10ac9b8
     1 <?php
       
     2 
       
     3 /*
       
     4 |--------------------------------------------------------------------------
       
     5 | Application Routes
       
     6 |--------------------------------------------------------------------------
       
     7 |
       
     8 | Here is where you can register all of the routes for an application.
       
     9 | It's a breeze. Simply tell Laravel the URIs it should respond to
       
    10 | and give it the controller to call when that URI is requested.
       
    11 |
       
    12 */
       
    13 
       
    14 Route::get('/', 'WelcomeController@index');
       
    15 
       
    16 Route::get('home', 'HomeController@index');
       
    17 
       
    18 Route::group(['middleware' => ['web']], function () {
       
    19 
       
    20     //Route::get('bo/docs/docDetailClient', 'Bo\DocumentListController@showClient');
       
    21     Route::pattern('docs', ".*");
       
    22     Route::get('bo/docs/client/{docs}', 'Bo\DocumentListController@getClient')
       
    23         ->name('bo.docs.client')
       
    24         ->where('docs', '.+');
       
    25     Route::resource('bo/docs', 'Bo\DocumentListController');
       
    26 
       
    27 
       
    28     Route::controllers([
       
    29     //    'auth' => 'Auth\AuthController',
       
    30         'password' => 'Auth\PasswordController',
       
    31     ]);
       
    32 });
       
    33 
       
    34 /*
       
    35 |--------------------------------------------------------------------------
       
    36 | Api Route
       
    37 |--------------------------------------------------------------------------
       
    38 |
       
    39 |
       
    40 */
       
    41 
       
    42 Route::group(['prefix' => 'api/v1', 'middleware' => 'cors'] , function() {
       
    43     Route::pattern('documents', ".*");
       
    44 
       
    45     Route::get('documents/{id}/transcript', 'Api\DocumentController@transcript');
       
    46     Route::resource('documents', 'Api\DocumentController',
       
    47                     ['only' => ['index', 'show', 'update']]);
       
    48     Route::resource('viaf', 'Api\ViafController',
       
    49                     ['only' => ['show']]);
       
    50     Route::resource('lexvo', 'Api\LexvoController',
       
    51                     ['only' => ['show']]);
       
    52     Route::resource('bnf', 'Api\BnfController',
       
    53                     ['only' => ['index','show']]);
       
    54     Route::resource('languages', 'Api\LanguageController',
       
    55                     ['only' => ['index']]);
       
    56     Route::resource('themes', 'Api\ThemeController',
       
    57                     ['only' => ['index']]);
       
    58     Route::resource('discourses', 'Api\DiscourseController',
       
    59                     ['only' => ['index']]);
       
    60 
       
    61 });
       
    62 
       
    63 /*
       
    64 |--------------------------------------------------------------------------
       
    65 | Proxy Route
       
    66 |--------------------------------------------------------------------------
       
    67 |
       
    68 |
       
    69 */
       
    70 Route::group(['prefix' => 'proxy', 'middleware' => 'cors'] , function() {
       
    71     Route::get('bnf', 'Proxy\BnfController@proxyAutoCompletion');
       
    72     Route::get('bnf-sparql', 'Proxy\BnfController@proxySparql');
       
    73 });