1
Route::get('/teacher', [
'uses' => '[email protected]',
'as' => 'teacher',
'middleware' => 'roles',
'roles' => ['Admin', 'Teacher']
]);
にこれを変換しないかは、どのように私は私がindex()
とshow($id)
機能と一致しますlaravelルーティングiのリソース
Route::resource('teacher',TeacherController, [
'uses' => '[email protected]',
'as' => 'teacher',
'middleware' => 'roles',
'roles' => ['Admin', 'Teacher']
]);