68 lines
3.8 KiB
PHP
68 lines
3.8 KiB
PHP
<?php
|
|
|
|
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!
|
|
|
|
|
*/
|
|
|
|
$middlewareGroups = [
|
|
'private' => [
|
|
\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("/s/theme", [\App\Http\Controllers\TenantController::class, 'tenantThemeView']);
|
|
|
|
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("/g/{url}", [\App\Http\Controllers\GalleryController::class, 'showImagesView']);
|
|
Route::get("/g/{url}/edit", [\App\Http\Controllers\GalleryController::class, 'editGalleryView']);
|
|
Route::post("/g/{url}/edit", [\App\Http\Controllers\GalleryController::class, 'editGallery']);
|
|
Route::get("/g/{url}/setDefault", [\App\Http\Controllers\GalleryController::class, 'setDefault']);
|
|
Route::get("/g/{url}/delete", [\App\Http\Controllers\GalleryController::class, 'deleteImage']);
|
|
Route::post("/g/{url}/save", [\App\Http\Controllers\GalleryController::class, 'saveImage']);
|
|
Route::get("/s/watermark", [\App\Http\Controllers\TenantController::class, 'watermarkView']);
|
|
Route::post("/s/watermark", [\App\Http\Controllers\TenantController::class, 'watermarkSave']);
|
|
Route::get("/s/watermark/image", [\App\Http\Controllers\PublicController::class, "returnWatermakeFile"]);
|
|
Route::get("/s/watermark/delete", [\App\Http\Controllers\TenantController::class, "deleteWatermark"]);
|
|
Route::get("s/reports", [\App\Http\Controllers\ReportController::class, "showReportList"]);
|
|
Route::get("s/reports/{year}/{month}/space", [\App\Http\Controllers\ReportController::class, "spaceReport"]);
|
|
Route::get("s/reports/{year}/{month}/traffic", [\App\Http\Controllers\ReportController::class, "trafficReport"]);
|
|
|
|
Route::get("a/themes", [\App\Http\Controllers\AdminController::class, "themesView"]);
|
|
Route::post("a/themes", [\App\Http\Controllers\AdminController::class, "themesSettings"]);
|
|
});
|
|
|
|
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");
|
|
});
|