mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
split router
This commit is contained in:
parent
d744fba683
commit
1b23998248
@ -12,51 +12,51 @@ class AdminRoute
|
|||||||
'middleware' => 'admin'
|
'middleware' => 'admin'
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
// Config
|
// Config
|
||||||
$router->get('config/fetch', 'Admin\\ConfigController@fetch');
|
$router->get('/config/fetch', 'Admin\\ConfigController@fetch');
|
||||||
$router->post('config/save', 'Admin\\ConfigController@save');
|
$router->post('/config/save', 'Admin\\ConfigController@save');
|
||||||
// Plan
|
// Plan
|
||||||
$router->get('plan/fetch', 'Admin\\PlanController@fetch');
|
$router->get('/plan/fetch', 'Admin\\PlanController@fetch');
|
||||||
$router->post('plan/save', 'Admin\\PlanController@save');
|
$router->post('/plan/save', 'Admin\\PlanController@save');
|
||||||
$router->post('plan/drop', 'Admin\\PlanController@drop');
|
$router->post('/plan/drop', 'Admin\\PlanController@drop');
|
||||||
$router->post('plan/update', 'Admin\\PlanController@update');
|
$router->post('/plan/update', 'Admin\\PlanController@update');
|
||||||
// Server
|
// Server
|
||||||
$router->get('server/fetch', 'Admin\\ServerController@fetch');
|
$router->get('/server/fetch', 'Admin\\ServerController@fetch');
|
||||||
$router->post('server/save', 'Admin\\ServerController@save');
|
$router->post('/server/save', 'Admin\\ServerController@save');
|
||||||
$router->get('server/group/fetch', 'Admin\\ServerController@groupFetch');
|
$router->get('/server/group/fetch', 'Admin\\ServerController@groupFetch');
|
||||||
$router->post('server/group/save', 'Admin\\ServerController@groupSave');
|
$router->post('/server/group/save', 'Admin\\ServerController@groupSave');
|
||||||
$router->post('server/group/drop', 'Admin\\ServerController@groupDrop');
|
$router->post('/server/group/drop', 'Admin\\ServerController@groupDrop');
|
||||||
$router->post('server/drop', 'Admin\\ServerController@drop');
|
$router->post('/server/drop', 'Admin\\ServerController@drop');
|
||||||
$router->post('server/update', 'Admin\\ServerController@update');
|
$router->post('/server/update', 'Admin\\ServerController@update');
|
||||||
// Order
|
// Order
|
||||||
$router->get('order/fetch', 'Admin\\OrderController@fetch');
|
$router->get('/order/fetch', 'Admin\\OrderController@fetch');
|
||||||
$router->post('order/repair', 'Admin\\OrderController@repair');
|
$router->post('/order/repair', 'Admin\\OrderController@repair');
|
||||||
$router->post('order/update', 'Admin\\OrderController@update');
|
$router->post('/order/update', 'Admin\\OrderController@update');
|
||||||
// User
|
// User
|
||||||
$router->get('user/fetch', 'Admin\\UserController@fetch');
|
$router->get('/user/fetch', 'Admin\\UserController@fetch');
|
||||||
$router->post('user/update', 'Admin\\UserController@update');
|
$router->post('/user/update', 'Admin\\UserController@update');
|
||||||
$router->get('user/id2UserInfo/{id}', 'Admin\\UserController@id2UserInfo');
|
$router->get('/user/id2UserInfo/{id}', 'Admin\\UserController@id2UserInfo');
|
||||||
// Stat
|
// Stat
|
||||||
$router->get('stat/getOverride', 'Admin\\StatController@getOverride');
|
$router->get('/stat/getOverride', 'Admin\\StatController@getOverride');
|
||||||
// Notice
|
// Notice
|
||||||
$router->get('notice/fetch', 'Admin\\NoticeController@fetch');
|
$router->get('/notice/fetch', 'Admin\\NoticeController@fetch');
|
||||||
$router->post('notice/save', 'Admin\\NoticeController@save');
|
$router->post('/notice/save', 'Admin\\NoticeController@save');
|
||||||
$router->post('notice/update', 'Admin\\NoticeController@update');
|
$router->post('/notice/update', 'Admin\\NoticeController@update');
|
||||||
$router->post('notice/drop', 'Admin\\NoticeController@drop');
|
$router->post('/notice/drop', 'Admin\\NoticeController@drop');
|
||||||
// Ticket
|
// Ticket
|
||||||
$router->get('ticket/fetch', 'Admin\\TicketController@fetch');
|
$router->get('/ticket/fetch', 'Admin\\TicketController@fetch');
|
||||||
$router->post('ticket/reply', 'Admin\\TicketController@reply');
|
$router->post('/ticket/reply', 'Admin\\TicketController@reply');
|
||||||
$router->post('ticket/close', 'Admin\\TicketController@close');
|
$router->post('/ticket/close', 'Admin\\TicketController@close');
|
||||||
// Mail
|
// Mail
|
||||||
$router->post('mail/send', 'Admin\\MailController@send');
|
$router->post('/mail/send', 'Admin\\MailController@send');
|
||||||
// Coupon
|
// Coupon
|
||||||
$router->get('coupon/fetch', 'Admin\\CouponController@fetch');
|
$router->get('/coupon/fetch', 'Admin\\CouponController@fetch');
|
||||||
$router->post('coupon/save', 'Admin\\CouponController@save');
|
$router->post('/coupon/save', 'Admin\\CouponController@save');
|
||||||
$router->post('coupon/drop', 'Admin\\CouponController@drop');
|
$router->post('/coupon/drop', 'Admin\\CouponController@drop');
|
||||||
// Tutorial
|
// Tutorial
|
||||||
$router->get('tutorial/fetch', 'Admin\\TutorialController@fetch');
|
$router->get('/tutorial/fetch', 'Admin\\TutorialController@fetch');
|
||||||
$router->post('tutorial/save', 'Admin\\TutorialController@save');
|
$router->post('/tutorial/save', 'Admin\\TutorialController@save');
|
||||||
$router->post('tutorial/show', 'Admin\\TutorialController@show');
|
$router->post('/tutorial/show', 'Admin\\TutorialController@show');
|
||||||
$router->post('tutorial/drop', 'Admin\\TutorialController@drop');
|
$router->post('/tutorial/drop', 'Admin\\TutorialController@drop');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,12 +12,12 @@ class ClientRoute
|
|||||||
'middleware' => 'client'
|
'middleware' => 'client'
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
// Plan
|
// Plan
|
||||||
$router->get('plan/fetch', 'Guest\\PlanController@fetch');
|
$router->get('/plan/fetch', 'Guest\\PlanController@fetch');
|
||||||
// Order
|
// Order
|
||||||
$router->post('order/alipayNotify', 'Guest\\OrderController@alipayNotify');
|
$router->post('/order/alipayNotify', 'Guest\\OrderController@alipayNotify');
|
||||||
$router->post('order/stripeNotify', 'Guest\\OrderController@stripeNotify');
|
$router->post('/order/stripeNotify', 'Guest\\OrderController@stripeNotify');
|
||||||
$router->post('order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify');
|
$router->post('/order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify');
|
||||||
$router->post('order/payTaroNotify', 'Guest\\OrderController@payTaroNotify');
|
$router->post('/order/payTaroNotify', 'Guest\\OrderController@payTaroNotify');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,12 @@ class GuestRoute
|
|||||||
'prefix' => 'guest'
|
'prefix' => 'guest'
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
// Plan
|
// Plan
|
||||||
$router->get('plan/fetch', 'Guest\\PlanController@fetch');
|
$router->get('/plan/fetch', 'Guest\\PlanController@fetch');
|
||||||
// Order
|
// Order
|
||||||
$router->post('order/alipayNotify', 'Guest\\OrderController@alipayNotify');
|
$router->post('/order/alipayNotify', 'Guest\\OrderController@alipayNotify');
|
||||||
$router->post('order/stripeNotify', 'Guest\\OrderController@stripeNotify');
|
$router->post('/order/stripeNotify', 'Guest\\OrderController@stripeNotify');
|
||||||
$router->post('order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify');
|
$router->post('/order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify');
|
||||||
$router->post('order/payTaroNotify', 'Guest\\OrderController@payTaroNotify');
|
$router->post('/order/payTaroNotify', 'Guest\\OrderController@payTaroNotify');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,14 +11,14 @@ class PassportRoute
|
|||||||
'prefix' => 'passport'
|
'prefix' => 'passport'
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
// Auth
|
// Auth
|
||||||
$router->post('auth/register', 'Passport\\AuthController@register');
|
$router->post('/auth/register', 'Passport\\AuthController@register');
|
||||||
$router->post('auth/login', 'Passport\\AuthController@login');
|
$router->post('/auth/login', 'Passport\\AuthController@login');
|
||||||
$router->get('auth/token2Login', 'Passport\\AuthController@token2Login');
|
$router->get('/auth/token2Login', 'Passport\\AuthController@token2Login');
|
||||||
$router->get('auth/check', 'Passport\\AuthController@check');
|
$router->get('/auth/check', 'Passport\\AuthController@check');
|
||||||
$router->post('auth/forget', 'Passport\\AuthController@index');
|
$router->post('/auth/forget', 'Passport\\AuthController@index');
|
||||||
// Comm
|
// Comm
|
||||||
$router->get('comm/config', 'Passport\\CommController@config');
|
$router->get('/comm/config', 'Passport\\CommController@config');
|
||||||
$router->post('comm/sendEmailVerify', 'Passport\\CommController@sendEmailVerify');
|
$router->post('/comm/sendEmailVerify', 'Passport\\CommController@sendEmailVerify');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,43 +12,43 @@ class UserRoute
|
|||||||
'middleware' => 'user'
|
'middleware' => 'user'
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
// User
|
// User
|
||||||
$router->get('resetSecurity', 'User\\UserController@resetSecurity');
|
$router->get('/resetSecurity', 'User\\UserController@resetSecurity');
|
||||||
$router->get('logout', 'User\\UserController@logout');
|
$router->get('/logout', 'User\\UserController@logout');
|
||||||
$router->get('info', 'User\\UserController@info');
|
$router->get('/info', 'User\\UserController@info');
|
||||||
$router->post('changePassword', 'User\\UserController@changePassword');
|
$router->post('/changePassword', 'User\\UserController@changePassword');
|
||||||
$router->post('update', 'User\\UserController@update');
|
$router->post('/update', 'User\\UserController@update');
|
||||||
$router->get('getSubscribe', 'User\\UserController@getSubscribe');
|
$router->get('/getSubscribe', 'User\\UserController@getSubscribe');
|
||||||
$router->get('getStat', 'User\\UserController@getStat');
|
$router->get('/getStat', 'User\\UserController@getStat');
|
||||||
// Order
|
// Order
|
||||||
$router->post('order/save', 'User\\OrderController@save');
|
$router->post('/order/save', 'User\\OrderController@save');
|
||||||
$router->post('order/checkout', 'User\\OrderController@checkout');
|
$router->post('/order/checkout', 'User\\OrderController@checkout');
|
||||||
$router->get('order/check', 'User\\OrderController@check');
|
$router->get('/order/check', 'User\\OrderController@check');
|
||||||
$router->get('order/details', 'User\\OrderController@details');
|
$router->get('/order/details', 'User\\OrderController@details');
|
||||||
$router->get('order/fetch', 'User\\OrderController@fetch');
|
$router->get('/order/fetch', 'User\\OrderController@fetch');
|
||||||
$router->get('order/getPaymentMethod', 'User\\OrderController@getPaymentMethod');
|
$router->get('/order/getPaymentMethod', 'User\\OrderController@getPaymentMethod');
|
||||||
$router->post('order/cancel', 'User\\OrderController@cancel');
|
$router->post('/order/cancel', 'User\\OrderController@cancel');
|
||||||
// Plan
|
// Plan
|
||||||
$router->get('plan/fetch', 'User\\PlanController@fetch');
|
$router->get('/plan/fetch', 'User\\PlanController@fetch');
|
||||||
// Invite
|
// Invite
|
||||||
$router->get('invite/save', 'User\\InviteController@save');
|
$router->get('/invite/save', 'User\\InviteController@save');
|
||||||
$router->get('invite/fetch', 'User\\InviteController@fetch');
|
$router->get('/invite/fetch', 'User\\InviteController@fetch');
|
||||||
$router->get('invite/details', 'User\\InviteController@details');
|
$router->get('/invite/details', 'User\\InviteController@details');
|
||||||
// Tutorial
|
// Tutorial
|
||||||
$router->get('tutorial/getSubscribeUrl', 'User\\TutorialController@getSubscribeUrl');
|
$router->get('/tutorial/getSubscribeUrl', 'User\\TutorialController@getSubscribeUrl');
|
||||||
$router->get('tutorial/getAppleID', 'User\\TutorialController@getAppleID');
|
$router->get('/tutorial/getAppleID', 'User\\TutorialController@getAppleID');
|
||||||
$router->get('tutorial/fetch', 'User\\TutorialController@fetch');
|
$router->get('/tutorial/fetch', 'User\\TutorialController@fetch');
|
||||||
// Notice
|
// Notice
|
||||||
$router->get('notice/fetch', 'User\\NoticeController@fetch');
|
$router->get('/notice/fetch', 'User\\NoticeController@fetch');
|
||||||
// Ticket
|
// Ticket
|
||||||
$router->post('ticket/reply', 'User\\TicketController@reply');
|
$router->post('/ticket/reply', 'User\\TicketController@reply');
|
||||||
$router->post('ticket/close', 'User\\TicketController@close');
|
$router->post('/ticket/close', 'User\\TicketController@close');
|
||||||
$router->post('ticket/save', 'User\\TicketController@save');
|
$router->post('/ticket/save', 'User\\TicketController@save');
|
||||||
$router->get('ticket/fetch', 'User\\TicketController@fetch');
|
$router->get('/ticket/fetch', 'User\\TicketController@fetch');
|
||||||
// Server
|
// Server
|
||||||
$router->get('server/fetch', 'User\\ServerController@fetch');
|
$router->get('/server/fetch', 'User\\ServerController@fetch');
|
||||||
$router->get('server/log/fetch', 'User\\ServerController@logFetch');
|
$router->get('/server/log/fetch', 'User\\ServerController@logFetch');
|
||||||
// Coupon
|
// Coupon
|
||||||
$router->post('coupon/check', 'User\\CouponController@check');
|
$router->post('/coupon/check', 'User\\CouponController@check');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
protected function mapApiRoutes()
|
protected function mapApiRoutes()
|
||||||
{
|
{
|
||||||
Route::group([
|
Route::group([
|
||||||
'prefix' => 'api/v1',
|
'prefix' => '/api/v1',
|
||||||
'middleware' => 'api',
|
'middleware' => 'api',
|
||||||
'namespace' => $this->namespace
|
'namespace' => $this->namespace
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
|
Loading…
Reference in New Issue
Block a user