applicant-site/routes/admin.php

32 lines
1.3 KiB
PHP

<?php
use App\Http\Controllers\Catalog\DepartmentController;
use App\Http\Controllers\Catalog\DirectionController;
use App\Http\Controllers\Catalog\EducationalInstitutionController;
use App\Http\Controllers\Catalog\FacultyController;
use App\Http\Controllers\DocumentController;
use App\Http\Controllers\ReceptionScreenController;
use App\Http\Controllers\UserController;
Route::middleware(['auth', 'verified'])->prefix('admin')->group(function () {
Route::get('/dashboard', function () {
return view('admin');
})->name('dashboard');
Route::get('/files/create/{document?}', [DocumentController::class, 'create'])->name('document_create');
Route::get('/files/download/{Document}', [DocumentController::class, 'download'])->name('document.download');
Route::resource('/educational-institutions', EducationalInstitutionController::class)
->scoped(['educational_institution' => 'slug']);
Route::resource('/directions', DirectionController::class)
->scoped(['educational_institution' => 'slug']);
Route::resources([
'/files' => DocumentController::class,
'/users' => UserController::class,
'/admin-reception-screen' => ReceptionScreenController::class,
'/faculties' => FacultyController::class,
'/departments' => DepartmentController::class,
]);
});