[ \App\Http\Middleware\TenanMiddleware::class ], ]; Route::get("/register", [\App\Http\Controllers\AccountController::class, 'registerView']); Route::post("/register", [\App\Http\Controllers\AccountController::class, 'register']); Route::get("/login", [\App\Http\Controllers\AccountController::class, 'loginView']); Route::post("/login", [\App\Http\Controllers\AccountController::class, 'login']); Route::middleware([\App\Http\Middleware\TenanMiddleware::class])->group(function () { Route::get("/d", [\App\Http\Controllers\DashboardController::class, 'dashboardView']); Route::get("/t/new", [\App\Http\Controllers\TenantController::class, 'newView']); Route::post("/t/new", [\App\Http\Controllers\TenantController::class, 'newTenant']); Route::get("/t/select/{name}", [\App\Http\Controllers\TenantController::class, 'switchTenant']); Route::get("/g", [\App\Http\Controllers\GalleryController::class, 'listView']); Route::get("/g/new", [\App\Http\Controllers\GalleryController::class, 'newView']); Route::post("/g/new", [\App\Http\Controllers\GalleryController::class, 'newGallery']); Route::get("/g/{url}/upload", [\App\Http\Controllers\GalleryController::class, 'imagesUploadView']); Route::post("/g/{url}/upload", [\App\Http\Controllers\GalleryController::class, 'imageUpload']); }); Route::get("/{name}", [\App\Http\Controllers\PublicController::class, 'listGalleriesView'])->middleware([\App\Http\Middleware\TenanMiddleware::class]); Route::get("/{tenant}/{gallery}", [\App\Http\Controllers\PublicController::class, 'listGalleryImagesView'])->middleware([\App\Http\Middleware\TenanMiddleware::class]); Route::get("/{tenant}/{gallery}/{image}/file", [\App\Http\Controllers\PublicController::class, 'returnImageFile']); Route::get('/', function () { return redirect("/login"); });