Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

grouping route in laravel

Route::group(['middleware' => ['auth', 'checkOnboarding']], function () {
    Route::get('/home', 'HomeController@index');
    Route::get('/account', 'AccountController@index');
});

Route::group(['prefix' => 'setup', 'middleware' => 'auth'], function () {
    Route::get('/', 'OnboardingController@index')->name('setup');
    Route::post('/settings', 'SettingsController@store');
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #grouping #route #laravel
ADD COMMENT
Topic
Name
5+9 =