2019-10-29 15:33:36 +08:00
|
|
|
<?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')
|
|
|
|
->group(function () {
|
|
|
|
// Admin
|
|
|
|
Route::prefix('admin')
|
|
|
|
->middleware('admin')
|
|
|
|
->group(function () {
|
|
|
|
// Config
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('config/fetch', 'Admin\\ConfigController@fetch');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('config/save', 'Admin\\ConfigController@save');
|
|
|
|
// Plan
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('plan/fetch', 'Admin\\PlanController@fetch');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('plan/save', 'Admin\\PlanController@save');
|
|
|
|
Route::post('plan/drop', 'Admin\\PlanController@drop');
|
|
|
|
Route::post('plan/update', 'Admin\\PlanController@update');
|
|
|
|
// Server
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('server/fetch', 'Admin\\ServerController@fetch');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('server/save', 'Admin\\ServerController@save');
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('server/group/fetch', 'Admin\\ServerController@groupFetch');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('server/group/save', 'Admin\\ServerController@groupSave');
|
|
|
|
Route::post('server/group/drop', 'Admin\\ServerController@groupDrop');
|
|
|
|
Route::post('server/drop', 'Admin\\ServerController@drop');
|
2019-11-18 18:21:56 +08:00
|
|
|
Route::post('server/update', 'Admin\\ServerController@update');
|
2019-10-29 15:33:36 +08:00
|
|
|
// Order
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('order/fetch', 'Admin\\OrderController@fetch');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('order/repair', 'Admin\\OrderController@repair');
|
2019-11-29 01:58:20 +08:00
|
|
|
Route::post('order/update', 'Admin\\OrderController@update');
|
2019-10-29 15:33:36 +08:00
|
|
|
// User
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('user/fetch', 'Admin\\UserController@fetch');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('user/update', 'Admin\\UserController@update');
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('user/id2UserInfo/{id}', 'Admin\\UserController@id2UserInfo');
|
2019-12-23 18:46:37 +08:00
|
|
|
// Stat
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('stat/getOverride', 'Admin\\StatController@getOverride');
|
2019-12-12 13:45:46 +08:00
|
|
|
// Notice
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('notice/fetch', 'Admin\\NoticeController@fetch');
|
2019-12-12 13:45:46 +08:00
|
|
|
Route::post('notice/save', 'Admin\\NoticeController@save');
|
2019-12-12 14:34:28 +08:00
|
|
|
Route::post('notice/update', 'Admin\\NoticeController@update');
|
2019-12-12 14:41:51 +08:00
|
|
|
Route::post('notice/drop', 'Admin\\NoticeController@drop');
|
2019-12-13 16:00:04 +08:00
|
|
|
// Ticket
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('ticket/fetch', 'Admin\\TicketController@fetch');
|
2019-12-13 16:05:16 +08:00
|
|
|
Route::post('ticket/reply', 'Admin\\TicketController@reply');
|
2019-12-13 17:29:55 +08:00
|
|
|
Route::post('ticket/close', 'Admin\\TicketController@close');
|
2019-12-30 22:40:39 +08:00
|
|
|
// Mail
|
|
|
|
Route::post('mail/send', 'Admin\\MailController@send');
|
2019-12-31 17:49:24 +08:00
|
|
|
// Coupon
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('coupon/fetch', 'Admin\\CouponController@fetch');
|
2019-12-31 17:49:24 +08:00
|
|
|
Route::post('coupon/save', 'Admin\\CouponController@save');
|
2020-01-03 01:12:23 +08:00
|
|
|
Route::post('coupon/drop', 'Admin\\CouponController@drop');
|
2020-01-02 21:38:32 +08:00
|
|
|
// Tutorial
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('tutorial/fetch', 'Admin\\TutorialController@fetch');
|
2020-01-02 21:38:32 +08:00
|
|
|
Route::post('tutorial/save', 'Admin\\TutorialController@save');
|
|
|
|
Route::post('tutorial/show', 'Admin\\TutorialController@show');
|
2020-01-03 01:12:23 +08:00
|
|
|
Route::post('tutorial/drop', 'Admin\\TutorialController@drop');
|
2019-10-29 15:33:36 +08:00
|
|
|
});
|
|
|
|
// User
|
|
|
|
Route::prefix('user')
|
|
|
|
->middleware('user')
|
|
|
|
->group(function () {
|
|
|
|
// User
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('resetSecurity', 'UserController@resetSecurity');
|
|
|
|
Route::get('logout', 'UserController@logout');
|
|
|
|
Route::get('info', 'UserController@info');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('changePassword', 'UserController@changePassword');
|
|
|
|
Route::post('update', 'UserController@update');
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('getSubscribe', 'UserController@getSubscribe');
|
|
|
|
Route::get('getStat', 'UserController@getStat');
|
2019-10-29 15:33:36 +08:00
|
|
|
// Order
|
|
|
|
Route::post('order/save', 'OrderController@save');
|
|
|
|
Route::post('order/checkout', 'OrderController@checkout');
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('order/check', 'OrderController@check');
|
|
|
|
Route::get('order/details', 'OrderController@details');
|
|
|
|
Route::get('order/fetch', 'OrderController@fetch');
|
|
|
|
Route::get('order/getPaymentMethod', 'OrderController@getPaymentMethod');
|
2020-01-02 00:06:23 +08:00
|
|
|
Route::post('order/cancel', 'OrderController@cancel');
|
2019-10-29 15:33:36 +08:00
|
|
|
// Plan
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('plan/fetch', 'PlanController@fetch');
|
2019-10-29 15:33:36 +08:00
|
|
|
// Invite
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('invite/save', 'InviteController@save');
|
|
|
|
Route::get('invite/fetch', 'InviteController@fetch');
|
|
|
|
Route::get('invite/details', 'InviteController@details');
|
2019-11-23 01:41:47 +08:00
|
|
|
// Tutorial
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('tutorial/getSubscribeUrl', 'TutorialController@getSubscribeUrl');
|
|
|
|
Route::get('tutorial/getAppleID', 'TutorialController@getAppleID');
|
|
|
|
Route::get('tutorial/fetch', 'TutorialController@fetch');
|
2019-12-12 13:45:46 +08:00
|
|
|
// Notice
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('notice/fetch', 'NoticeController@fetch');
|
2019-12-12 19:47:32 +08:00
|
|
|
// Ticket
|
2019-12-12 20:33:14 +08:00
|
|
|
Route::post('ticket/reply', 'TicketController@reply');
|
2019-12-13 17:29:55 +08:00
|
|
|
Route::post('ticket/close', 'TicketController@close');
|
2019-12-23 15:48:32 +08:00
|
|
|
Route::post('ticket/save', 'TicketController@save');
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('ticket/fetch', 'TicketController@fetch');
|
2019-12-22 23:59:27 +08:00
|
|
|
// Server
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('server/fetch', 'ServerController@fetch');
|
|
|
|
Route::get('server/log/fetch', 'ServerController@logFetch');
|
2020-01-01 15:59:53 +08:00
|
|
|
// Coupon
|
|
|
|
Route::post('coupon/check', 'CouponController@check');
|
2019-10-29 15:33:36 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
// Passport
|
|
|
|
Route::prefix('passport')
|
|
|
|
->group(function () {
|
|
|
|
// Register
|
|
|
|
Route::post('register', 'Passport\\RegisterController@index');
|
|
|
|
// Comm
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('config', 'Passport\\CommController@config');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('sendEmailVerify', 'Passport\\CommController@sendEmailVerify');
|
|
|
|
// Login
|
|
|
|
Route::post('login', 'Passport\\LoginController@index');
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('token2Login', 'Passport\\LoginController@token2Login');
|
|
|
|
Route::get('check', 'Passport\\LoginController@check');
|
2019-11-30 17:01:46 +08:00
|
|
|
// Forget
|
|
|
|
Route::post('forget', 'Passport\\ForgetController@index');
|
2019-10-29 15:33:36 +08:00
|
|
|
});
|
|
|
|
// No Auth
|
|
|
|
Route::prefix('guest')
|
|
|
|
->group(function () {
|
|
|
|
// Plan
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('plan/fetch', 'Guest\\PlanController@fetch');
|
2019-10-29 15:33:36 +08:00
|
|
|
// Order
|
|
|
|
Route::post('order/alipayNotify', 'Guest\\OrderController@alipayNotify');
|
|
|
|
Route::post('order/stripeNotify', 'Guest\\OrderController@stripeNotify');
|
2020-01-03 01:47:15 +08:00
|
|
|
Route::post('order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify');
|
2020-01-18 18:41:02 +08:00
|
|
|
Route::post('order/payTaroNotify', 'Guest\\OrderController@payTaroNotify');
|
2019-10-29 15:33:36 +08:00
|
|
|
});
|
|
|
|
// Client
|
|
|
|
Route::prefix('client')
|
|
|
|
->middleware('client')
|
|
|
|
->group(function () {
|
|
|
|
// Client
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('subscribe', 'ClientController@subscribe');
|
2019-12-02 17:07:44 +08:00
|
|
|
// App
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('app/data', 'AppController@data');
|
|
|
|
Route::get('app/config', 'AppController@config');
|
2019-10-29 15:33:36 +08:00
|
|
|
});
|
|
|
|
// Server
|
|
|
|
Route::prefix('server')
|
|
|
|
->group(function () {
|
|
|
|
// Deepbwork
|
2020-01-11 13:36:52 +08:00
|
|
|
Route::get('deepbwork/user', 'Server\\DeepbworkController@user');
|
|
|
|
Route::get('deepbwork/config', 'Server\\DeepbworkController@config');
|
2019-10-29 15:33:36 +08:00
|
|
|
Route::post('deepbwork/submit', 'Server\\DeepbworkController@submit');
|
|
|
|
});
|
2020-01-11 13:36:52 +08:00
|
|
|
});
|