jeudi 5 juillet 2018

Laravel - Routes with "sub" views

I am just getting started with Laravel and find the route setup a little confusing. I am trying to create a few pages, that ultimately should have the struture:

domain.com/onboarding
domain.com/onboarding/skip
domain.com/onboarding/skip/anothersubview

etc.

Right now I have:

// Registered and Activated User Routes
Route::group(['middleware' => ['auth', 'activated', 'activity']], function () {

    Route::get('/onboarding', 'UserController@Onboarding')->name('onboarding');
});

Would the solution here (and best practice) be to just add another route inside my Route::group, like:

Route::view('/onboarding/skip', 'onboarding.skip');

Is this the correct way of doing things?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire