2021-01-11 11:49:50 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
2021-01-12 14:49:45 +00:00
|
|
|
|
|
|
|
|
2021-01-11 11:49:50 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2021-01-12 14:49:45 +00:00
|
|
|
$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']);
|
|
|
|
|
2021-02-07 23:11:09 +00:00
|
|
|
Route::middleware([\App\Http\Middleware\TenanMiddleware::class, \App\Http\Middleware\AuthMiddleware::class])->group(function () {
|
2021-01-12 14:49:45 +00:00
|
|
|
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']);
|
2021-01-27 00:11:16 +00:00
|
|
|
Route::get("/s/theme", [\App\Http\Controllers\TenantController::class, 'tenantThemeView']);
|
2021-01-27 00:38:17 +00:00
|
|
|
Route::get("/s/theme/set", [\App\Http\Controllers\TenantController::class, 'tenantThemeSet']);
|
|
|
|
Route::get("/s/theme/set-gallery", [\App\Http\Controllers\TenantController::class, 'tenantGalleryDefaultTemplateSet']);
|
2021-01-12 14:49:45 +00:00
|
|
|
|
|
|
|
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']);
|
2021-01-12 16:50:08 +00:00
|
|
|
Route::get("/g/{url}", [\App\Http\Controllers\GalleryController::class, 'showImagesView']);
|
2021-01-17 14:32:25 +00:00
|
|
|
Route::get("/g/{url}/edit", [\App\Http\Controllers\GalleryController::class, 'editGalleryView']);
|
|
|
|
Route::post("/g/{url}/edit", [\App\Http\Controllers\GalleryController::class, 'editGallery']);
|
2021-01-12 19:45:20 +00:00
|
|
|
Route::get("/g/{url}/setDefault", [\App\Http\Controllers\GalleryController::class, 'setDefault']);
|
2021-01-19 18:57:14 +00:00
|
|
|
Route::get("/g/{url}/delete", [\App\Http\Controllers\GalleryController::class, 'deleteImage']);
|
2021-01-19 23:41:02 +00:00
|
|
|
Route::post("/g/{url}/save", [\App\Http\Controllers\GalleryController::class, 'saveImage']);
|
2021-01-20 20:25:29 +00:00
|
|
|
Route::get("/s/watermark", [\App\Http\Controllers\TenantController::class, 'watermarkView']);
|
|
|
|
Route::post("/s/watermark", [\App\Http\Controllers\TenantController::class, 'watermarkSave']);
|
2021-01-20 20:43:58 +00:00
|
|
|
Route::get("/s/watermark/image", [\App\Http\Controllers\PublicController::class, "returnWatermakeFile"]);
|
2021-01-20 21:35:41 +00:00
|
|
|
Route::get("/s/watermark/delete", [\App\Http\Controllers\TenantController::class, "deleteWatermark"]);
|
2021-01-21 14:36:33 +00:00
|
|
|
Route::get("s/reports", [\App\Http\Controllers\ReportController::class, "showReportList"]);
|
|
|
|
Route::get("s/reports/{year}/{month}/space", [\App\Http\Controllers\ReportController::class, "spaceReport"]);
|
2021-01-21 15:05:26 +00:00
|
|
|
Route::get("s/reports/{year}/{month}/traffic", [\App\Http\Controllers\ReportController::class, "trafficReport"]);
|
2021-01-21 17:56:30 +00:00
|
|
|
|
|
|
|
Route::get("a/themes", [\App\Http\Controllers\AdminController::class, "themesView"]);
|
|
|
|
Route::post("a/themes", [\App\Http\Controllers\AdminController::class, "themesSettings"]);
|
2021-01-12 14:49:45 +00:00
|
|
|
});
|
|
|
|
|
2021-02-08 00:15:18 +00:00
|
|
|
Route::get("/{name}.json", [\App\Http\Controllers\PublicController::class, 'listGalleriesViewAPI'])->middleware([\App\Http\Middleware\TenanMiddleware::class]);
|
2021-01-12 14:49:45 +00:00
|
|
|
Route::get("/{name}", [\App\Http\Controllers\PublicController::class, 'listGalleriesView'])->middleware([\App\Http\Middleware\TenanMiddleware::class]);
|
2021-02-08 10:00:42 +00:00
|
|
|
Route::get("/{tenant}/{gallery}.json", [\App\Http\Controllers\PublicController::class, 'listGalleryImagesViewAPI'])->middleware([\App\Http\Middleware\TenanMiddleware::class]);
|
2021-01-12 14:49:45 +00:00
|
|
|
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']);
|
|
|
|
|
|
|
|
|
2021-01-11 11:49:50 +00:00
|
|
|
Route::get('/', function () {
|
2021-01-12 14:49:45 +00:00
|
|
|
return redirect("/login");
|
2021-01-11 11:49:50 +00:00
|
|
|
});
|