51 lines
1.8 KiB
PHP
51 lines
1.8 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\Web\Admin\UserController;
|
|
use App\Http\Controllers\Web\Admin\AttendanceController;
|
|
use App\Http\Controllers\Web\Admin\PermissionController;
|
|
use App\Http\Controllers\Web\Admin\LocationController;
|
|
use App\Http\Controllers\Web\Admin\ReportController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Web Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider and all of them will
|
|
| be assigned to the "web" middleware group. Make something great!
|
|
|
|
|
*/
|
|
|
|
Route::get('/', function () {
|
|
return redirect()->route('auth.login');
|
|
});
|
|
|
|
Route::get('/login', fn()=>view('auth.login'))->name('auth.login');
|
|
|
|
Route::middleware(['web.auth:admin'])->group(function () {
|
|
Route::get('/dashboard', fn()=>view('dashboard.index'))->name('dashboard.index');
|
|
Route::get('/profile', fn()=>view('dashboard.profile'))->name('profile.index');
|
|
|
|
Route::prefix('users')->name('users.')->group(function () {
|
|
Route::get('/', fn()=>view('dashboard.user'))->name('index');
|
|
});
|
|
|
|
Route::prefix('attendances')->name('attendances.')->group(function () {
|
|
Route::get('/', fn()=>view('dashboard.attendance'))->name('index');
|
|
});
|
|
|
|
Route::prefix('permissions')->name('permissions.')->group(function () {
|
|
Route::get('/', fn()=>view('dashboard.permission'))->name('index');
|
|
});
|
|
|
|
Route::prefix('locations')->name('locations.')->group(function () {
|
|
Route::get('/', fn()=>view('dashboard.location'))->name('index');
|
|
});
|
|
|
|
Route::prefix('reports')->name('reports.')->group(function () {
|
|
Route::get('/', fn()=>view('dashboard.report'))->name('index');
|
|
});
|
|
});
|