-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi.php
47 lines (39 loc) · 1.49 KB
/
api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::prefix('v1/auth')->group(function () {
Route::post('login', 'API\AuthController@login')->name('api.auth.login');
Route::post('logout', 'API\AuthController@logout')->name('api.auth.logout');
Route::post('refresh', 'API\AuthController@refresh')->name('api.auth.refresh');
Route::post('show', 'API\AuthController@showMe')->name('api.auth.show');
});
Route::prefix('v1/admin')->group(function () {
Route::apiResources([
'roles' => 'API\RolesController',
'users' => 'API\UsersController',
'states' => 'API\StatesController',
'cities' => 'API\CitiesController',
]);
});
Route::prefix('v1/peaje')->group(function () {
Route::apiResources([
'tolls' => 'API\TollsController',
'type-toll-vehicles' => 'API\TypeTollVehiclesController',
]);
});
Route::prefix('v1/remisiones')->group(function () {
Route::apiResources([
'ballots' => 'API\BallotsController',
'marks' => 'API\MarksController',
'type-vehicles' => 'API\TypeVehiclesController',
]);
});