true]); Route::get('/', function () { return redirect('/explore'); })->name('main.welcome'); Route::get('/explore', [MainController::class, 'index']); Route::prefix('manager')->group(function () { Route::get('/register/{token}', [RegisterController::class, 'showRegistrationForm'])->name('manager.register')->middleware('invitation.token'); Route::post('/register', [RegisterController::class, 'register'])->name('manager.register.submit'); }); /* PROTECTED ROUTES */ Route::middleware(['auth', 'verified'])->group(function () { Route::get('/onboarding', [OnboardingController::class, 'index'])->name('onboarding'); Route::post('/onboarding', [OnboardingController::class, 'create'])->name('onboarding.create'); Route::group(['middleware' => ['onboarding']], function () { /* EVENTS */ Route::prefix('events')->group(function () { Route::get('/', [EventController::class, 'index'])->name('organizer.events'); Route::get('/create', [EventController::class, 'create']); Route::get('/create/{username}', [EventController::class, 'create']); Route::get('/{slug}', [EventController::class, 'show']); Route::get('/edit/{slug}', [EventController::class, 'edit']); Route::post('/edit/{id}', [EventController::class, 'update']); Route::post('/create', [EventController::class, 'store']); }); Route::prefix('payments')->group(function () { Route::get('/', [TransactionController::class, 'index']); Route::post('/{id}/purchase', [TransactionController::class, 'purchase'])->name('payments.purchase'); // Route::get('/billing-portal', [TransactionController::class, 'billingPortal']); }); /* OFFER */ Route::prefix('offers')->group(function () { Route::get('/', [OfferController::class, 'index']); Route::get('/{slug}', [OfferController::class, 'show']); Route::get('/create/{username}', [OfferController::class, 'create']); Route::post('/create', [OfferController::class, 'store']); Route::post('/reply', [OfferController::class, 'writeComment']); Route::post('/set-price', [OfferController::class, 'setPrice']); Route::post('/decline', [OfferController::class, 'declineOffer']); Route::post('/accept', [OfferController::class, 'acceptOffer']); }); Route::prefix('invoices')->group(function () { Route::get('/{invoiceId}', [InvoiceController::class, 'show']); }); /* ARTISTS */ Route::prefix('artists')->group(function () { Route::get('/', [ManagerController::class, 'index']); Route::post('/review', [ReviewController::class, 'store']); Route::post('/manager/invite', [InviteManagerController::class, 'storeInvitation']); }); /* MANAGER */ Route::prefix('manager')->group(function () { Route::get('/accept/{token}', [InviteManagerController::class, 'accept'])->name('manager.accept.invite')->middleware('invitation.token'); }); }); }); Route::get('/{username}', [ProfileController::class, 'show']); Route::get('/{username}/manager', [ArtistController::class, 'showManager']); Route::post('/{username}/manager/remove', [ArtistController::class, 'removeManager']);