Files
coruna-lab/server/routes/admin.php
T
hashbro ea0be57180 init
2026-08-04 05:00:42 +08:00

22 lines
1.1 KiB
PHP

<?php
use App\Http\Controllers\Admin\AuthController;
use App\Http\Controllers\Admin\DeviceController;
use App\Http\Controllers\Admin\RawLogController;
use Illuminate\Support\Facades\Route;
Route::prefix('admin')->name('admin.')->group(function () {
Route::get('login', [AuthController::class, 'showLogin'])->name('login');
Route::post('login', [AuthController::class, 'login'])->name('login.submit');
Route::middleware('auth:admin')->group(function () {
Route::post('logout', [AuthController::class, 'logout'])->name('logout');
Route::get('/', [AuthController::class, 'home'])->name('home');
Route::get('devices', [DeviceController::class, 'index'])->name('devices.index');
Route::get('devices/{device}', [DeviceController::class, 'show'])->name('devices.show');
Route::get('devices/{device}/photos/{photo}', [DeviceController::class, 'photo'])->name('devices.photo');
Route::get('logs', [RawLogController::class, 'index'])->name('logs.index');
Route::get('logs/{file}', [RawLogController::class, 'show'])->name('logs.show');
});
});