forked from aslan/applicant-site
refactoring routes
This commit is contained in:
parent
2279341988
commit
de6b83d675
|
@ -13,6 +13,7 @@ class EducationalInstitution extends Model
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'id',
|
'id',
|
||||||
'name',
|
'name',
|
||||||
|
'slug',
|
||||||
'description',
|
'description',
|
||||||
'position',
|
'position',
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,18 +3,22 @@
|
||||||
use App\Http\Controllers\Catalog\DepartmentController;
|
use App\Http\Controllers\Catalog\DepartmentController;
|
||||||
use App\Http\Controllers\Catalog\EducationalInstitutionController;
|
use App\Http\Controllers\Catalog\EducationalInstitutionController;
|
||||||
use App\Http\Controllers\Catalog\FacultyController;
|
use App\Http\Controllers\Catalog\FacultyController;
|
||||||
use App\Http\Controllers\FileController;
|
use App\Http\Controllers\DocumentController;
|
||||||
use App\Http\Controllers\ReceptionScreenController;
|
use App\Http\Controllers\ReceptionScreenController;
|
||||||
use App\Http\Controllers\UserController;
|
use App\Http\Controllers\UserController;
|
||||||
|
|
||||||
Route::middleware(['auth', 'verified'])->prefix('admin')->group(function () {
|
Route::middleware(['auth', 'verified'])->prefix('admin')->group(function () {
|
||||||
Route::get('/files/create/{file?}', [FileController::class, 'create'])->name('files_create');
|
Route::get('/dashboard', function () {
|
||||||
Route::get('/files/download/{file}', [FileController::class, 'download'])->name('files.download');
|
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)
|
Route::resource('/educational-institutions', EducationalInstitutionController::class)
|
||||||
->scoped(['educational_institution' => 'slug']);
|
->scoped(['educational_institution' => 'slug']);
|
||||||
Route::resources([
|
Route::resources([
|
||||||
'/files' => FileController::class,
|
'/files' => DocumentController::class,
|
||||||
'/users' => UserController::class,
|
'/users' => UserController::class,
|
||||||
'/admin-reception-screen' => ReceptionScreenController::class,
|
'/admin-reception-screen' => ReceptionScreenController::class,
|
||||||
'/faculties' => FacultyController::class,
|
'/faculties' => FacultyController::class,
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
use App\Http\Controllers\ProfileController;
|
use App\Http\Controllers\ProfileController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::get('/dashboard', function () {
|
|
||||||
return view('admin');
|
|
||||||
})->prefix('admin')->middleware(['auth', 'verified'])->name('dashboard');
|
|
||||||
|
|
||||||
Route::middleware('auth')->group(function () {
|
Route::middleware('auth')->group(function () {
|
||||||
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
||||||
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
||||||
|
|
Loading…
Reference in New Issue