2021-06-05 09:26:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use App\Http\Controllers\Admin\ActivityLogController;
|
2021-06-06 18:22:40 +00:00
|
|
|
use App\Http\Controllers\Admin\ApplicationApiController;
|
2021-06-05 09:26:32 +00:00
|
|
|
use App\Http\Controllers\Admin\ConfigurationController;
|
2021-11-07 00:47:16 +00:00
|
|
|
use App\Http\Controllers\Admin\OverViewController;
|
2021-06-05 09:26:32 +00:00
|
|
|
use App\Http\Controllers\Admin\PaymentController;
|
|
|
|
use App\Http\Controllers\Admin\PaypalProductController;
|
|
|
|
use App\Http\Controllers\Admin\ProductController;
|
|
|
|
use App\Http\Controllers\Admin\ServerController as AdminServerController;
|
|
|
|
use App\Http\Controllers\Admin\SettingsController;
|
2021-06-10 21:25:13 +00:00
|
|
|
use App\Http\Controllers\Admin\UsefulLinkController;
|
2021-06-05 09:26:32 +00:00
|
|
|
use App\Http\Controllers\Admin\UserController;
|
2021-07-09 22:18:22 +00:00
|
|
|
use App\Http\Controllers\Admin\VoucherController;
|
2021-06-05 09:26:32 +00:00
|
|
|
use App\Http\Controllers\Auth\SocialiteController;
|
|
|
|
use App\Http\Controllers\HomeController;
|
|
|
|
use App\Http\Controllers\NotificationController;
|
2021-11-06 00:56:57 +00:00
|
|
|
use App\Http\Controllers\ProductController as FrontProductController;
|
2021-06-05 09:26:32 +00:00
|
|
|
use App\Http\Controllers\ProfileController;
|
|
|
|
use App\Http\Controllers\ServerController;
|
|
|
|
use App\Http\Controllers\StoreController;
|
2021-12-16 10:06:54 +00:00
|
|
|
use App\Http\Controllers\TranslationController;
|
2021-07-10 07:41:24 +00:00
|
|
|
use Illuminate\Http\Request;
|
2021-06-12 11:59:48 +00:00
|
|
|
use Illuminate\Support\Facades\Auth;
|
2021-06-05 09:26:32 +00:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Web Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
Route::middleware('guest')->get('/', function () {
|
|
|
|
return redirect('login');
|
|
|
|
})->name('welcome');
|
|
|
|
|
|
|
|
Auth::routes(['verify' => true]);
|
|
|
|
|
2021-09-26 15:50:13 +00:00
|
|
|
Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
2021-06-12 11:59:48 +00:00
|
|
|
#resend verification email
|
|
|
|
Route::get('/email/verification-notification', function (Request $request) {
|
|
|
|
$request->user()->sendEmailVerificationNotification();
|
|
|
|
|
|
|
|
return back()->with('success', 'Verification link sent!');
|
|
|
|
})->middleware(['auth', 'throttle:3,1'])->name('verification.send');
|
|
|
|
|
2021-06-05 09:26:32 +00:00
|
|
|
#normal routes
|
|
|
|
Route::resource('notifications', NotificationController::class);
|
|
|
|
Route::resource('servers', ServerController::class);
|
|
|
|
Route::resource('profile', ProfileController::class);
|
|
|
|
Route::resource('store', StoreController::class);
|
|
|
|
|
2021-11-06 00:56:57 +00:00
|
|
|
#server create utility routes (product)
|
|
|
|
#routes made for server create page to fetch product info
|
2021-11-07 11:07:30 +00:00
|
|
|
Route::get('/products/nodes/egg/{egg?}', [FrontProductController::class, 'getNodesBasedOnEgg'])->name('products.nodes.egg');
|
2021-11-07 15:29:18 +00:00
|
|
|
Route::get('/products/locations/egg/{egg?}', [FrontProductController::class, 'getLocationsBasedOnEgg'])->name('products.locations.egg');
|
2021-11-11 21:05:42 +00:00
|
|
|
Route::get('/products/products/{egg?}/{node?}', [FrontProductController::class, 'getProductsBasedOnNode'])->name('products.products.node');
|
2021-11-06 00:56:57 +00:00
|
|
|
|
2021-06-05 09:26:32 +00:00
|
|
|
#payments
|
|
|
|
Route::get('checkout/{paypalProduct}', [PaymentController::class, 'checkOut'])->name('checkout');
|
|
|
|
Route::get('payment/success', [PaymentController::class, 'success'])->name('payment.success');
|
|
|
|
Route::get('payment/cancel', [PaymentController::class, 'cancel'])->name('payment.cancel');
|
|
|
|
Route::get('payment/pay/{paypalProduct}', [PaymentController::class, 'pay'])->name('payment.pay');
|
|
|
|
|
|
|
|
Route::get('users/logbackin', [UserController::class, 'logBackIn'])->name('users.logbackin');
|
|
|
|
|
|
|
|
#discord
|
|
|
|
Route::get('/auth/redirect', [SocialiteController::class, 'redirect'])->name('auth.redirect');
|
|
|
|
Route::get('/auth/callback', [SocialiteController::class, 'callback'])->name('auth.callback');
|
|
|
|
|
2021-07-10 06:58:11 +00:00
|
|
|
#voucher redeem
|
2021-07-10 07:41:24 +00:00
|
|
|
Route::post('/voucher/redeem', [VoucherController::class, 'redeem'])->middleware('throttle:5,1')->name('voucher.redeem');
|
2021-07-10 06:58:11 +00:00
|
|
|
|
2021-12-16 10:06:54 +00:00
|
|
|
#switch language
|
|
|
|
Route::post('changelocale', [TranslationController::class, 'changeLocale'])->name('changeLocale');
|
2021-06-05 09:26:32 +00:00
|
|
|
#admin
|
|
|
|
Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () {
|
|
|
|
|
2021-11-07 11:07:30 +00:00
|
|
|
Route::get('overview', [OverViewController::class, 'index'])->name('overview.index');
|
|
|
|
Route::get('overview/sync', [OverViewController::class, 'syncPterodactyl'])->name('overview.sync');
|
2021-11-07 00:47:16 +00:00
|
|
|
|
2021-06-05 09:26:32 +00:00
|
|
|
Route::resource('activitylogs', ActivityLogController::class);
|
|
|
|
|
2021-08-04 20:01:50 +00:00
|
|
|
Route::get("users.json", [UserController::class, "json"])->name('users.json');
|
2021-06-05 09:26:32 +00:00
|
|
|
Route::get('users/loginas/{user}', [UserController::class, 'loginAs'])->name('users.loginas');
|
|
|
|
Route::get('users/datatable', [UserController::class, 'datatable'])->name('users.datatable');
|
2021-08-04 20:01:50 +00:00
|
|
|
Route::get('users/notifications', [UserController::class, 'notifications'])->name('users.notifications');
|
|
|
|
Route::post('users/notifications', [UserController::class, 'notify'])->name('users.notifications');
|
2021-09-26 15:50:13 +00:00
|
|
|
Route::post('users/togglesuspend/{user}', [UserController::class, 'toggleSuspended'])->name('users.togglesuspend');
|
2021-06-05 09:26:32 +00:00
|
|
|
Route::resource('users', UserController::class);
|
|
|
|
|
|
|
|
Route::get('servers/datatable', [AdminServerController::class, 'datatable'])->name('servers.datatable');
|
|
|
|
Route::post('servers/togglesuspend/{server}', [AdminServerController::class, 'toggleSuspended'])->name('servers.togglesuspend');
|
|
|
|
Route::resource('servers', AdminServerController::class);
|
|
|
|
|
|
|
|
Route::get('products/datatable', [ProductController::class, 'datatable'])->name('products.datatable');
|
2021-07-06 21:19:25 +00:00
|
|
|
Route::get('products/clone/{product}', [ProductController::class, 'clone'])->name('products.clone');
|
2021-06-05 09:26:32 +00:00
|
|
|
Route::patch('products/disable/{product}', [ProductController::class, 'disable'])->name('products.disable');
|
|
|
|
Route::resource('products', ProductController::class);
|
|
|
|
|
|
|
|
Route::get('store/datatable', [PaypalProductController::class, 'datatable'])->name('store.datatable');
|
|
|
|
Route::patch('store/disable/{paypalProduct}', [PaypalProductController::class, 'disable'])->name('store.disable');
|
|
|
|
Route::resource('store', PaypalProductController::class)->parameters([
|
|
|
|
'store' => 'paypalProduct',
|
|
|
|
]);
|
|
|
|
|
2021-06-23 09:28:57 +00:00
|
|
|
Route::get('payments/datatable', [PaymentController::class, 'datatable'])->name('payments.datatable');
|
2021-06-05 09:26:32 +00:00
|
|
|
Route::get('payments', [PaymentController::class, 'index'])->name('payments.index');
|
|
|
|
|
2021-11-07 00:47:16 +00:00
|
|
|
// Route::get('nodes/datatable', [NodeController::class, 'datatable'])->name('nodes.datatable');
|
|
|
|
// Route::get('nodes/sync', [NodeController::class, 'sync'])->name('nodes.sync');
|
|
|
|
// Route::resource('nodes', NodeController::class);
|
|
|
|
//
|
|
|
|
// Route::get('nests/datatable', [NestsController::class, 'datatable'])->name('nests.datatable');
|
|
|
|
// Route::get('nests/sync', [NestsController::class, 'sync'])->name('nests.sync');
|
|
|
|
// Route::resource('nests', NestsController::class);
|
2021-06-05 09:26:32 +00:00
|
|
|
|
|
|
|
Route::get('configurations/datatable', [ConfigurationController::class, 'datatable'])->name('configurations.datatable');
|
|
|
|
Route::patch('configurations/updatevalue', [ConfigurationController::class, 'updatevalue'])->name('configurations.updatevalue');
|
|
|
|
Route::resource('configurations', ConfigurationController::class);
|
2021-06-23 09:28:57 +00:00
|
|
|
Route::resource('configurations', ConfigurationController::class);
|
2021-06-05 09:26:32 +00:00
|
|
|
|
2021-07-01 09:47:40 +00:00
|
|
|
Route::patch('settings/update/icons', [SettingsController::class, 'updateIcons'])->name('settings.update.icons');
|
2021-11-30 17:40:56 +00:00
|
|
|
Route::patch('settings/update/invoice-settings', [SettingsController::class, 'updateInvoiceSettings'])->name('settings.update.invoicesettings');
|
2021-12-02 08:54:30 +00:00
|
|
|
Route::get('settings/download-invoices', [SettingsController::class, 'downloadAllInvoices'])->name('settings.downloadAllInvoices');;
|
2021-06-05 09:26:32 +00:00
|
|
|
Route::resource('settings', SettingsController::class)->only('index');
|
2021-06-06 18:22:40 +00:00
|
|
|
|
2021-06-10 21:25:13 +00:00
|
|
|
Route::get('usefullinks/datatable', [UsefulLinkController::class, 'datatable'])->name('usefullinks.datatable');
|
|
|
|
Route::resource('usefullinks', UsefulLinkController::class);
|
|
|
|
|
2021-07-09 22:18:22 +00:00
|
|
|
Route::get('vouchers/datatable', [VoucherController::class, 'datatable'])->name('vouchers.datatable');
|
2021-10-02 22:55:10 +00:00
|
|
|
Route::get('vouchers/{voucher}/usersdatatable', [VoucherController::class, 'usersdatatable'])->name('vouchers.usersdatatable');
|
|
|
|
Route::get('vouchers/{voucher}/users', [VoucherController::class, 'users'])->name('vouchers.users');
|
2021-07-09 22:18:22 +00:00
|
|
|
Route::resource('vouchers', VoucherController::class);
|
|
|
|
|
2021-06-06 18:22:40 +00:00
|
|
|
Route::get('api/datatable', [ApplicationApiController::class, 'datatable'])->name('api.datatable');
|
|
|
|
Route::resource('api', ApplicationApiController::class)->parameters([
|
|
|
|
'api' => 'applicationApi',
|
|
|
|
]);
|
2021-06-05 09:26:32 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::get('/home', [HomeController::class, 'index'])->name('home');
|
|
|
|
});
|