“Gruppierroute in Laravel” Code-Antworten

Routengruppe in Laravel

Route::group(['prefix' => 'admin']){
	Route::get('/',function(){
    	//...
    });
}
azonedev

Gruppierroute 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');
});
Elegant Eel

Gruppierroute in Laravel

Route::group(['middleware' => 'auth'], function () {

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

    Route::group(['prefix' => 'setup'], function () {
        Route::get('/', 'OnboardingController@index')->name('setup');
        Route::post('/settings', 'SettingsController@store');
    });
});
Elegant Eel

Ähnliche Antworten wie “Gruppierroute in Laravel”

Fragen ähnlich wie “Gruppierroute in Laravel”

Weitere verwandte Antworten zu “Gruppierroute in Laravel” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen