[dfae77e] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | use App\Http\Controllers\ArtistController;
|
---|
| 4 | use App\Http\Controllers\Auth\VerificationController;
|
---|
| 5 | use App\Http\Controllers\InviteManagerController;
|
---|
| 6 | use App\Http\Controllers\InvoiceController;
|
---|
| 7 | use App\Http\Controllers\MainController;
|
---|
| 8 | use App\Http\Controllers\EventController;
|
---|
| 9 | use App\Http\Controllers\ManagerAuth\RegisterController;
|
---|
| 10 | use App\Http\Controllers\ManagerController;
|
---|
| 11 | use App\Http\Controllers\OfferController;
|
---|
| 12 | use App\Http\Controllers\OnboardingController;
|
---|
| 13 | use App\Http\Controllers\OrganizerController;
|
---|
| 14 | use App\Http\Controllers\ProfileController;
|
---|
| 15 | use App\Http\Controllers\ReviewController;
|
---|
| 16 | use App\Http\Controllers\TransactionController;
|
---|
| 17 | use Illuminate\Support\Facades\Auth;
|
---|
| 18 | use Illuminate\Support\Facades\Route;
|
---|
| 19 |
|
---|
| 20 | /*
|
---|
| 21 | |--------------------------------------------------------------------------
|
---|
| 22 | | Web Routes
|
---|
| 23 | |--------------------------------------------------------------------------
|
---|
| 24 | |
|
---|
| 25 | | Here is where you can register web routes for your application. These
|
---|
| 26 | | routes are loaded by the RouteServiceProvider within a group which
|
---|
| 27 | | contains the "web" middleware group. Now create something great!
|
---|
| 28 | |
|
---|
| 29 | */
|
---|
| 30 |
|
---|
| 31 | Auth::routes(['verify' => true]);
|
---|
| 32 |
|
---|
| 33 | Route::get('/', function () {
|
---|
| 34 | return redirect('/explore');
|
---|
| 35 | })->name('main.welcome');
|
---|
| 36 |
|
---|
| 37 | Route::get('/explore', [MainController::class, 'index']);
|
---|
| 38 |
|
---|
| 39 | Route::prefix('manager')->group(function () {
|
---|
| 40 | Route::get('/register/{token}', [RegisterController::class, 'showRegistrationForm'])->name('manager.register')->middleware('invitation.token');
|
---|
| 41 | Route::post('/register', [RegisterController::class, 'register'])->name('manager.register.submit');
|
---|
| 42 | });
|
---|
| 43 |
|
---|
| 44 | /* PROTECTED ROUTES */
|
---|
| 45 | Route::middleware(['auth', 'verified'])->group(function () {
|
---|
| 46 | Route::get('/onboarding', [OnboardingController::class, 'index'])->name('onboarding');
|
---|
| 47 | Route::post('/onboarding', [OnboardingController::class, 'create'])->name('onboarding.create');
|
---|
| 48 |
|
---|
| 49 | Route::group(['middleware' => ['onboarding']], function () {
|
---|
| 50 | /* EVENTS */
|
---|
| 51 | Route::prefix('events')->group(function () {
|
---|
| 52 | Route::get('/', [EventController::class, 'index'])->name('organizer.events');
|
---|
| 53 | Route::get('/create', [EventController::class, 'create']);
|
---|
| 54 | Route::get('/create/{username}', [EventController::class, 'create']);
|
---|
| 55 | Route::get('/{slug}', [EventController::class, 'show']);
|
---|
| 56 | Route::get('/edit/{slug}', [EventController::class, 'edit']);
|
---|
| 57 | Route::post('/edit/{id}', [EventController::class, 'update']);
|
---|
| 58 | Route::post('/create', [EventController::class, 'store']);
|
---|
| 59 | });
|
---|
| 60 |
|
---|
| 61 | Route::prefix('payments')->group(function () {
|
---|
| 62 | Route::get('/', [TransactionController::class, 'index']);
|
---|
| 63 | Route::post('/{id}/purchase', [TransactionController::class, 'purchase'])->name('payments.purchase');
|
---|
| 64 | // Route::get('/billing-portal', [TransactionController::class, 'billingPortal']);
|
---|
| 65 | });
|
---|
| 66 |
|
---|
| 67 | /* OFFER */
|
---|
| 68 | Route::prefix('offers')->group(function () {
|
---|
| 69 | Route::get('/', [OfferController::class, 'index']);
|
---|
| 70 | Route::get('/{slug}', [OfferController::class, 'show']);
|
---|
| 71 | Route::get('/create/{username}', [OfferController::class, 'create']);
|
---|
| 72 | Route::post('/create', [OfferController::class, 'store']);
|
---|
| 73 | Route::post('/reply', [OfferController::class, 'writeComment']);
|
---|
| 74 | Route::post('/set-price', [OfferController::class, 'setPrice']);
|
---|
| 75 | Route::post('/decline', [OfferController::class, 'declineOffer']);
|
---|
| 76 | Route::post('/accept', [OfferController::class, 'acceptOffer']);
|
---|
| 77 | });
|
---|
| 78 |
|
---|
| 79 | Route::prefix('invoices')->group(function () {
|
---|
| 80 | Route::get('/{invoiceId}', [InvoiceController::class, 'show']);
|
---|
| 81 | });
|
---|
| 82 |
|
---|
| 83 | /* ARTISTS */
|
---|
| 84 | Route::prefix('artists')->group(function () {
|
---|
| 85 | Route::get('/', [ManagerController::class, 'index']);
|
---|
| 86 | Route::post('/review', [ReviewController::class, 'store']);
|
---|
| 87 | Route::post('/manager/invite', [InviteManagerController::class, 'storeInvitation']);
|
---|
| 88 | });
|
---|
| 89 |
|
---|
| 90 | /* MANAGER */
|
---|
| 91 | Route::prefix('manager')->group(function () {
|
---|
| 92 | Route::get('/accept/{token}', [InviteManagerController::class, 'accept'])->name('manager.accept.invite')->middleware('invitation.token');
|
---|
| 93 | });
|
---|
| 94 | });
|
---|
| 95 | });
|
---|
| 96 |
|
---|
| 97 | Route::get('/{username}', [ProfileController::class, 'show']);
|
---|
| 98 | Route::get('/{username}/manager', [ArtistController::class, 'showManager']);
|
---|
| 99 | Route::post('/{username}/manager/remove', [ArtistController::class, 'removeManager']);
|
---|
| 100 |
|
---|
| 101 |
|
---|
| 102 |
|
---|