CourseWork/routes/web.php
2024-05-07 15:05:10 +04:00

26 lines
927 B
PHP

<?php
use App\Http\Controllers\GradeController;
use App\Http\Controllers\GradeSubjectController;
use App\Http\Controllers\GradeTeacherController;
use App\Http\Controllers\StudentController;
use App\Http\Controllers\SubjectController;
use App\Http\Controllers\SubjectTeacherController;
use App\Http\Controllers\TeacherController;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return redirect()->route('grades.index');
});
Route::resources([
'grades' => GradeController::class,
'subjects' => SubjectController::class,
'students' => StudentController::class,
'teachers' => TeacherController::class,
]);
Route::resource('teachers.subjects', SubjectTeacherController::class)->except('index');
Route::resource('teachers.subjects.grades', GradeTeacherController::class)->except('index', 'show');
Route::resource('grades.subjects', GradeSubjectController::class)->except('index', 'show');