forked from johndavedecano/laragym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.php
38 lines (34 loc) · 1.61 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
<?php
// AUTH ROUTES
Route::group(['prefix' => 'auth'], function () {
Route::post('signup', 'SignUpController@signUp');
Route::post('login', 'LoginController@login');
Route::post('forgot', 'ForgotPasswordController@forgot');
Route::post('reset', 'ResetPasswordController@resetPassword')->name('password.reset');
Route::post('logout', 'LogoutController@logout');
Route::post('refresh', 'RefreshController@refresh');
});
// MEMBER ROUTES
Route::group(['middleware' => 'jwt.auth'], function () {
Route::get('me', 'UserController@me');
});
// ADMIN ROUTES
Route::group(['middleware' => ['jwt.auth', 'admin']], function() {
Route::resource('cycles', 'CycleController');
Route::resource('services', 'ServiceController');
Route::resource('packages', 'PackageController');
Route::resource('users', 'UserController');
Route::resource('subscriptions', 'SubscriptionController');
Route::post('upload', 'ImageController@store');
Route::get('/stats/subscriptions', 'StatisticsController@subscriptions');
Route::get('/stats/services', 'StatisticsController@services');
Route::get('/stats/members', 'StatisticsController@members');
Route::get('/stats/packages', 'StatisticsController@packages');
Route::group(['prefix' => 'activities'], function() {
Route::get('system', 'ActivityController@system');
Route::get('attendance', 'ActivityController@attendance');
Route::post('attendance', 'ActivityController@store');
Route::delete('attendance/{id}', 'ActivityController@destroy');
Route::get('attendance/{id}', 'ActivityController@show');
});
});