In Routes, you can create a group within a group, assigning a certain middleware only to some URLs in the "parent" group.
1Route::group(['prefix' => 'account', 'as' => 'account.'], function() {2 Route::get('login', 'AccountController@login');3 Route::get('register', 'AccountController@register');4 5 Route::group(['middleware' => 'auth'], function() {6 Route::get('edit', 'AccountController@edit');7 });8});