2017-11-03 05:26:07 +00:00
|
|
|
<?php
|
|
|
|
|
2018-04-10 11:23:13 +00:00
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
2017-11-03 05:26:07 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| API Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2018-04-10 11:23:13 +00:00
|
|
|
| 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!
|
2017-11-03 05:26:07 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2018-04-10 11:23:13 +00:00
|
|
|
/*
|
|
|
|
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
|
|
|
return $request->user();
|
2017-11-03 05:26:07 +00:00
|
|
|
});
|
2018-04-10 11:23:13 +00:00
|
|
|
*/
|
2018-06-05 11:13:57 +00:00
|
|
|
|
2018-07-31 04:11:00 +00:00
|
|
|
Route::group(['middleware'=>['auth:api','role:reseller']], function() {
|
2018-07-17 04:10:40 +00:00
|
|
|
Route::get('/r/agents','ResellerServicesController@agents');
|
|
|
|
Route::get('/r/accounts','ResellerServicesController@accounts');
|
2018-08-08 23:33:51 +00:00
|
|
|
Route::get('/r/clients','ResellerServicesController@clients');
|
2018-11-21 02:46:16 +00:00
|
|
|
Route::get('/r/service_inactive','ResellerServicesController@service_inactive');
|
2018-07-17 04:10:40 +00:00
|
|
|
});
|
|
|
|
|
2018-06-05 11:13:57 +00:00
|
|
|
Route::group(['middleware'=>'auth:api'], function() {
|
2020-02-06 22:11:02 +00:00
|
|
|
Route::get('/u/services/{o}','UserServicesController@services')
|
|
|
|
->where('o','[0-9]+')
|
2020-07-27 04:49:59 +00:00
|
|
|
->middleware('can:view,o');
|
|
|
|
Route::post('/u/checkout/fee/{o}','CheckoutController@fee')
|
|
|
|
->where('o','[0-9]+');
|
2018-08-09 14:10:51 +00:00
|
|
|
});
|