diff --git a/app/Http/Routes/AdminRoute.php b/app/Http/Routes/AdminRoute.php index 251253ff..3511ca64 100644 --- a/app/Http/Routes/AdminRoute.php +++ b/app/Http/Routes/AdminRoute.php @@ -12,51 +12,51 @@ class AdminRoute 'middleware' => 'admin' ], function ($router) { // Config - $router->get('config/fetch', 'Admin\\ConfigController@fetch'); - $router->post('config/save', 'Admin\\ConfigController@save'); + $router->get('/config/fetch', 'Admin\\ConfigController@fetch'); + $router->post('/config/save', 'Admin\\ConfigController@save'); // Plan - $router->get('plan/fetch', 'Admin\\PlanController@fetch'); - $router->post('plan/save', 'Admin\\PlanController@save'); - $router->post('plan/drop', 'Admin\\PlanController@drop'); - $router->post('plan/update', 'Admin\\PlanController@update'); + $router->get('/plan/fetch', 'Admin\\PlanController@fetch'); + $router->post('/plan/save', 'Admin\\PlanController@save'); + $router->post('/plan/drop', 'Admin\\PlanController@drop'); + $router->post('/plan/update', 'Admin\\PlanController@update'); // Server - $router->get('server/fetch', 'Admin\\ServerController@fetch'); - $router->post('server/save', 'Admin\\ServerController@save'); - $router->get('server/group/fetch', 'Admin\\ServerController@groupFetch'); - $router->post('server/group/save', 'Admin\\ServerController@groupSave'); - $router->post('server/group/drop', 'Admin\\ServerController@groupDrop'); - $router->post('server/drop', 'Admin\\ServerController@drop'); - $router->post('server/update', 'Admin\\ServerController@update'); + $router->get('/server/fetch', 'Admin\\ServerController@fetch'); + $router->post('/server/save', 'Admin\\ServerController@save'); + $router->get('/server/group/fetch', 'Admin\\ServerController@groupFetch'); + $router->post('/server/group/save', 'Admin\\ServerController@groupSave'); + $router->post('/server/group/drop', 'Admin\\ServerController@groupDrop'); + $router->post('/server/drop', 'Admin\\ServerController@drop'); + $router->post('/server/update', 'Admin\\ServerController@update'); // Order - $router->get('order/fetch', 'Admin\\OrderController@fetch'); - $router->post('order/repair', 'Admin\\OrderController@repair'); - $router->post('order/update', 'Admin\\OrderController@update'); + $router->get('/order/fetch', 'Admin\\OrderController@fetch'); + $router->post('/order/repair', 'Admin\\OrderController@repair'); + $router->post('/order/update', 'Admin\\OrderController@update'); // User - $router->get('user/fetch', 'Admin\\UserController@fetch'); - $router->post('user/update', 'Admin\\UserController@update'); - $router->get('user/id2UserInfo/{id}', 'Admin\\UserController@id2UserInfo'); + $router->get('/user/fetch', 'Admin\\UserController@fetch'); + $router->post('/user/update', 'Admin\\UserController@update'); + $router->get('/user/id2UserInfo/{id}', 'Admin\\UserController@id2UserInfo'); // Stat - $router->get('stat/getOverride', 'Admin\\StatController@getOverride'); + $router->get('/stat/getOverride', 'Admin\\StatController@getOverride'); // Notice - $router->get('notice/fetch', 'Admin\\NoticeController@fetch'); - $router->post('notice/save', 'Admin\\NoticeController@save'); - $router->post('notice/update', 'Admin\\NoticeController@update'); - $router->post('notice/drop', 'Admin\\NoticeController@drop'); + $router->get('/notice/fetch', 'Admin\\NoticeController@fetch'); + $router->post('/notice/save', 'Admin\\NoticeController@save'); + $router->post('/notice/update', 'Admin\\NoticeController@update'); + $router->post('/notice/drop', 'Admin\\NoticeController@drop'); // Ticket - $router->get('ticket/fetch', 'Admin\\TicketController@fetch'); - $router->post('ticket/reply', 'Admin\\TicketController@reply'); - $router->post('ticket/close', 'Admin\\TicketController@close'); + $router->get('/ticket/fetch', 'Admin\\TicketController@fetch'); + $router->post('/ticket/reply', 'Admin\\TicketController@reply'); + $router->post('/ticket/close', 'Admin\\TicketController@close'); // Mail - $router->post('mail/send', 'Admin\\MailController@send'); + $router->post('/mail/send', 'Admin\\MailController@send'); // Coupon - $router->get('coupon/fetch', 'Admin\\CouponController@fetch'); - $router->post('coupon/save', 'Admin\\CouponController@save'); - $router->post('coupon/drop', 'Admin\\CouponController@drop'); + $router->get('/coupon/fetch', 'Admin\\CouponController@fetch'); + $router->post('/coupon/save', 'Admin\\CouponController@save'); + $router->post('/coupon/drop', 'Admin\\CouponController@drop'); // Tutorial - $router->get('tutorial/fetch', 'Admin\\TutorialController@fetch'); - $router->post('tutorial/save', 'Admin\\TutorialController@save'); - $router->post('tutorial/show', 'Admin\\TutorialController@show'); - $router->post('tutorial/drop', 'Admin\\TutorialController@drop'); + $router->get('/tutorial/fetch', 'Admin\\TutorialController@fetch'); + $router->post('/tutorial/save', 'Admin\\TutorialController@save'); + $router->post('/tutorial/show', 'Admin\\TutorialController@show'); + $router->post('/tutorial/drop', 'Admin\\TutorialController@drop'); }); } } diff --git a/app/Http/Routes/ClientRoute.php b/app/Http/Routes/ClientRoute.php index de735a54..b6337352 100644 --- a/app/Http/Routes/ClientRoute.php +++ b/app/Http/Routes/ClientRoute.php @@ -12,12 +12,12 @@ class ClientRoute 'middleware' => 'client' ], function ($router) { // Plan - $router->get('plan/fetch', 'Guest\\PlanController@fetch'); + $router->get('/plan/fetch', 'Guest\\PlanController@fetch'); // Order - $router->post('order/alipayNotify', 'Guest\\OrderController@alipayNotify'); - $router->post('order/stripeNotify', 'Guest\\OrderController@stripeNotify'); - $router->post('order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify'); - $router->post('order/payTaroNotify', 'Guest\\OrderController@payTaroNotify'); + $router->post('/order/alipayNotify', 'Guest\\OrderController@alipayNotify'); + $router->post('/order/stripeNotify', 'Guest\\OrderController@stripeNotify'); + $router->post('/order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify'); + $router->post('/order/payTaroNotify', 'Guest\\OrderController@payTaroNotify'); }); } } diff --git a/app/Http/Routes/GuestRoute.php b/app/Http/Routes/GuestRoute.php index ff7bed41..d0ea9160 100644 --- a/app/Http/Routes/GuestRoute.php +++ b/app/Http/Routes/GuestRoute.php @@ -11,12 +11,12 @@ class GuestRoute 'prefix' => 'guest' ], function ($router) { // Plan - $router->get('plan/fetch', 'Guest\\PlanController@fetch'); + $router->get('/plan/fetch', 'Guest\\PlanController@fetch'); // Order - $router->post('order/alipayNotify', 'Guest\\OrderController@alipayNotify'); - $router->post('order/stripeNotify', 'Guest\\OrderController@stripeNotify'); - $router->post('order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify'); - $router->post('order/payTaroNotify', 'Guest\\OrderController@payTaroNotify'); + $router->post('/order/alipayNotify', 'Guest\\OrderController@alipayNotify'); + $router->post('/order/stripeNotify', 'Guest\\OrderController@stripeNotify'); + $router->post('/order/bitpayXNotify', 'Guest\\OrderController@bitpayXNotify'); + $router->post('/order/payTaroNotify', 'Guest\\OrderController@payTaroNotify'); }); } } diff --git a/app/Http/Routes/PassportRoute.php b/app/Http/Routes/PassportRoute.php index 83c071af..a56fb1a9 100644 --- a/app/Http/Routes/PassportRoute.php +++ b/app/Http/Routes/PassportRoute.php @@ -11,14 +11,14 @@ class PassportRoute 'prefix' => 'passport' ], function ($router) { // Auth - $router->post('auth/register', 'Passport\\AuthController@register'); - $router->post('auth/login', 'Passport\\AuthController@login'); - $router->get('auth/token2Login', 'Passport\\AuthController@token2Login'); - $router->get('auth/check', 'Passport\\AuthController@check'); - $router->post('auth/forget', 'Passport\\AuthController@index'); + $router->post('/auth/register', 'Passport\\AuthController@register'); + $router->post('/auth/login', 'Passport\\AuthController@login'); + $router->get('/auth/token2Login', 'Passport\\AuthController@token2Login'); + $router->get('/auth/check', 'Passport\\AuthController@check'); + $router->post('/auth/forget', 'Passport\\AuthController@index'); // Comm - $router->get('comm/config', 'Passport\\CommController@config'); - $router->post('comm/sendEmailVerify', 'Passport\\CommController@sendEmailVerify'); + $router->get('/comm/config', 'Passport\\CommController@config'); + $router->post('/comm/sendEmailVerify', 'Passport\\CommController@sendEmailVerify'); }); } } diff --git a/app/Http/Routes/UserRoute.php b/app/Http/Routes/UserRoute.php index 3267c818..fadc232e 100644 --- a/app/Http/Routes/UserRoute.php +++ b/app/Http/Routes/UserRoute.php @@ -12,43 +12,43 @@ class UserRoute 'middleware' => 'user' ], function ($router) { // User - $router->get('resetSecurity', 'User\\UserController@resetSecurity'); - $router->get('logout', 'User\\UserController@logout'); - $router->get('info', 'User\\UserController@info'); - $router->post('changePassword', 'User\\UserController@changePassword'); - $router->post('update', 'User\\UserController@update'); - $router->get('getSubscribe', 'User\\UserController@getSubscribe'); - $router->get('getStat', 'User\\UserController@getStat'); + $router->get('/resetSecurity', 'User\\UserController@resetSecurity'); + $router->get('/logout', 'User\\UserController@logout'); + $router->get('/info', 'User\\UserController@info'); + $router->post('/changePassword', 'User\\UserController@changePassword'); + $router->post('/update', 'User\\UserController@update'); + $router->get('/getSubscribe', 'User\\UserController@getSubscribe'); + $router->get('/getStat', 'User\\UserController@getStat'); // Order - $router->post('order/save', 'User\\OrderController@save'); - $router->post('order/checkout', 'User\\OrderController@checkout'); - $router->get('order/check', 'User\\OrderController@check'); - $router->get('order/details', 'User\\OrderController@details'); - $router->get('order/fetch', 'User\\OrderController@fetch'); - $router->get('order/getPaymentMethod', 'User\\OrderController@getPaymentMethod'); - $router->post('order/cancel', 'User\\OrderController@cancel'); + $router->post('/order/save', 'User\\OrderController@save'); + $router->post('/order/checkout', 'User\\OrderController@checkout'); + $router->get('/order/check', 'User\\OrderController@check'); + $router->get('/order/details', 'User\\OrderController@details'); + $router->get('/order/fetch', 'User\\OrderController@fetch'); + $router->get('/order/getPaymentMethod', 'User\\OrderController@getPaymentMethod'); + $router->post('/order/cancel', 'User\\OrderController@cancel'); // Plan - $router->get('plan/fetch', 'User\\PlanController@fetch'); + $router->get('/plan/fetch', 'User\\PlanController@fetch'); // Invite - $router->get('invite/save', 'User\\InviteController@save'); - $router->get('invite/fetch', 'User\\InviteController@fetch'); - $router->get('invite/details', 'User\\InviteController@details'); + $router->get('/invite/save', 'User\\InviteController@save'); + $router->get('/invite/fetch', 'User\\InviteController@fetch'); + $router->get('/invite/details', 'User\\InviteController@details'); // Tutorial - $router->get('tutorial/getSubscribeUrl', 'User\\TutorialController@getSubscribeUrl'); - $router->get('tutorial/getAppleID', 'User\\TutorialController@getAppleID'); - $router->get('tutorial/fetch', 'User\\TutorialController@fetch'); + $router->get('/tutorial/getSubscribeUrl', 'User\\TutorialController@getSubscribeUrl'); + $router->get('/tutorial/getAppleID', 'User\\TutorialController@getAppleID'); + $router->get('/tutorial/fetch', 'User\\TutorialController@fetch'); // Notice - $router->get('notice/fetch', 'User\\NoticeController@fetch'); + $router->get('/notice/fetch', 'User\\NoticeController@fetch'); // Ticket - $router->post('ticket/reply', 'User\\TicketController@reply'); - $router->post('ticket/close', 'User\\TicketController@close'); - $router->post('ticket/save', 'User\\TicketController@save'); - $router->get('ticket/fetch', 'User\\TicketController@fetch'); + $router->post('/ticket/reply', 'User\\TicketController@reply'); + $router->post('/ticket/close', 'User\\TicketController@close'); + $router->post('/ticket/save', 'User\\TicketController@save'); + $router->get('/ticket/fetch', 'User\\TicketController@fetch'); // Server - $router->get('server/fetch', 'User\\ServerController@fetch'); - $router->get('server/log/fetch', 'User\\ServerController@logFetch'); + $router->get('/server/fetch', 'User\\ServerController@fetch'); + $router->get('/server/log/fetch', 'User\\ServerController@logFetch'); // Coupon - $router->post('coupon/check', 'User\\CouponController@check'); + $router->post('/coupon/check', 'User\\CouponController@check'); }); } } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index db028f78..fb353022 100755 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -65,7 +65,7 @@ class RouteServiceProvider extends ServiceProvider protected function mapApiRoutes() { Route::group([ - 'prefix' => 'api/v1', + 'prefix' => '/api/v1', 'middleware' => 'api', 'namespace' => $this->namespace ], function ($router) {