CourseWork/routes/web.php

26 lines
927 B
PHP
Raw Normal View History

2024-04-15 16:23:05 +04:00
<?php
2024-04-16 13:27:51 +04:00
use App\Http\Controllers\GradeController;
2024-05-07 12:14:18 +04:00
use App\Http\Controllers\GradeSubjectController;
2024-05-07 15:05:10 +04:00
use App\Http\Controllers\GradeTeacherController;
2024-04-23 14:52:49 +04:00
use App\Http\Controllers\StudentController;
2024-04-17 10:11:31 +04:00
use App\Http\Controllers\SubjectController;
2024-05-06 17:47:25 +04:00
use App\Http\Controllers\SubjectTeacherController;
2024-04-23 14:52:49 +04:00
use App\Http\Controllers\TeacherController;
2024-04-15 16:23:05 +04:00
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
2024-04-17 13:02:44 +04:00
return redirect()->route('grades.index');
2024-04-15 16:23:05 +04:00
});
2024-04-16 13:27:51 +04:00
2024-05-06 17:47:25 +04:00
Route::resources([
'grades' => GradeController::class,
'subjects' => SubjectController::class,
'students' => StudentController::class,
'teachers' => TeacherController::class,
]);
2024-05-07 15:05:10 +04:00
Route::resource('teachers.subjects', SubjectTeacherController::class)->except('index');
Route::resource('teachers.subjects.grades', GradeTeacherController::class)->except('index', 'show');
2024-05-07 12:14:18 +04:00
Route::resource('grades.subjects', GradeSubjectController::class)->except('index', 'show');