|
@@ -1,14 +1,14 @@
|
|
|
<?php
|
|
|
|
|
|
-use App\Components\Helpers;
|
|
|
-
|
|
|
Route::get('s/{code}', 'User\SubscribeController@getSubscribeByCode');
|
|
|
|
|
|
+
|
|
|
Route::prefix('callback')->group(function () {
|
|
|
Route::get('checkout', 'Gateway\PayPal@getCheckout');
|
|
|
Route::get('notify', 'PaymentController@notify');
|
|
|
-});
|
|
|
+});
|
|
|
|
|
|
+
|
|
|
Route::middleware(['isForbidden', 'affiliate', 'isMaintenance'])->group(function () {
|
|
|
Route::get('lang/{locale}', 'AuthController@switchLang')->name('lang');
|
|
|
Route::any('login', 'AuthController@login')->middleware('isSecurity')->name('login');
|
|
@@ -20,18 +20,12 @@ Route::middleware(['isForbidden', 'affiliate', 'isMaintenance'])->group(function
|
|
|
Route::get('active/{token}', 'AuthController@active')->name('activeAccount');
|
|
|
Route::post('send', 'AuthController@sendCode')->name('sendVerificationCode');
|
|
|
Route::get('free', 'AuthController@free')->name('freeInvitationCode');
|
|
|
- Route::get('createPasswd', function () {
|
|
|
- return Str::random();
|
|
|
- })->name('generateString');
|
|
|
- Route::get('createUUID', function () {
|
|
|
- return Str::uuid();
|
|
|
- })->name('generateUUID');
|
|
|
- Route::get('createSecurityCode', function () {
|
|
|
- return strtolower(Str::random(8));
|
|
|
- })->name('createSecurityCode');
|
|
|
-});
|
|
|
+ Route::get('create/string', '\Illuminate\Support\Str@random')->name('createStr');
|
|
|
+ Route::get('create/uuid', '\Illuminate\Support\Str@uuid')->name('createUUID');
|
|
|
+});
|
|
|
Route::any('admin/login', 'AuthController@login')->middleware('isForbidden', 'isSecurity');
|
|
|
|
|
|
+
|
|
|
Route::middleware(['isForbidden', 'isMaintenance', 'isLogin'])->group(function () {
|
|
|
Route::get('/', 'UserController@index')->name('home');
|
|
|
Route::get('article', 'UserController@article');
|
|
@@ -67,8 +61,9 @@ Route::middleware(['isForbidden', 'isMaintenance', 'isLogin'])->group(function (
|
|
|
Route::get('getStatus', 'PaymentController@getStatus');
|
|
|
Route::get('{trade_no}', 'PaymentController@detail');
|
|
|
});
|
|
|
-});
|
|
|
+});
|
|
|
|
|
|
+
|
|
|
Route::middleware(['isForbidden', 'isAdminLogin', 'isAdmin'])->prefix('admin')->name('admin.')->group(function () {
|
|
|
Route::get('/', 'AdminController@index')->name('index');
|
|
|
Route::any('profile', 'AdminController@profile')->name('profile');
|
|
@@ -76,6 +71,7 @@ Route::middleware(['isForbidden', 'isAdminLogin', 'isAdmin'])->prefix('admin')->
|
|
|
Route::get('invite', 'AdminController@inviteList')->name('invite');
|
|
|
Route::post('invite', 'AdminController@makeInvite')->name('invite.create');
|
|
|
Route::get('Invite/export', 'AdminController@exportInvite')->name('invite.export');
|
|
|
+ Route::get('getPort', 'AdminController@getPort')->name('getPort');
|
|
|
|
|
|
Route::namespace('Admin')->group(function () {
|
|
|
Route::resource('user', 'UserController')->except('show');
|
|
@@ -85,7 +81,6 @@ Route::middleware(['isForbidden', 'isAdminLogin', 'isAdmin'])->prefix('admin')->
|
|
|
Route::get('monitor/{id}', 'LogsController@userTrafficMonitor')->name('monitor');
|
|
|
Route::get("online/{id}", "LogsController@onlineIPMonitor")->name('online');
|
|
|
Route::post("switch", "UserController@switchToUser")->name('switch');
|
|
|
- Route::get('getPort', function () { return Helpers::getPort(); })->name('getPort');
|
|
|
Route::post('updateCredit', 'UserController@handleUserCredit')->name('updateCredit');
|
|
|
Route::post('reset', 'UserController@resetTraffic')->name('reset');
|
|
|
Route::get('export/{id}', 'UserController@export')->name('export');
|
|
@@ -184,4 +179,4 @@ Route::middleware(['isForbidden', 'isAdminLogin', 'isAdmin'])->prefix('admin')->
|
|
|
});
|
|
|
|
|
|
Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index')->name('log.viewer');
|
|
|
-});
|
|
|
+});
|