我需要保護我的後端部分。Laravel auto auth?
現在我有我喜歡這樣的:
Route::get('/backend',['middleware' => 'auth', 'uses' => '[email protected]']);
Route::get('/backend/users',['middleware' => 'auth', 'uses' => '[email protected]']);
Route::get('/backend/users/create',['middleware' => 'auth', 'uses' => '[email protected]']);
Route::get('/backend/users/edit/{id}',['middleware' => 'auth', 'uses' => '[email protected]']);
我是否需要寫中間件=> AUTH以everyline和everysite我有我的後臺?
是否有可能定義所有具有'後端/'的應該檢查是否auth或不?
你只需要使用'路線::組()'代替[鏈接](https://laravel.com/docs/5.4/routing#route-groups) –