Esempio n. 1
0
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    return view('welcome');
});
/*
|--------------------------------------------------------------------------
| Api Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an api.
|
*/
APIRoute::version('v1', function ($api) {
    RouteFusion::apiIndexListing($api);
    RouteFusion::apiLoginJWT($api);
    //authentification par JSONWebTokens (you must install tymon/jwt-auth package)
});
Esempio n. 2
0
<?php

APIRoute::version('v1', ['namespace' => 'Vinfo\\Http\\Controllers\\Api', 'prefix' => 'api/admin'], function () {
    APIRoute::post('geometries/related/search', 'GeometriesController@searchGeometried');
});
APIRoute::version('v1', ['namespace' => 'Vinfo\\Http\\Controllers\\Api', 'prefix' => 'api/admin'], function () {
    APIRoute::post('regions/tree/search/{exclude?}', 'RegionsController@searchRegions');
});
APIRoute::version('v1', ['namespace' => 'Vinfo\\Http\\Controllers\\Api'], function () {
});