“Gruppe in Route in Laravel” Code-Antworten

Laravel Route :: Gruppendefinition

Route::group(['prefix'=>'accounts','as'=>'account.'], function(){
    Route::get('/', 'AccountController@index')->name('index');
    Route::get('connect', 'AccountController@connect')->name('connect');
});

Route::group(['prefix'=>'quotes','as'=>'quote.'], function(){
    Route::get('/', 'QuoteController@index')->name('index');
    Route::get('connect', 'QuoteController@create')->name('create');
});
Depressed Deer

Gruppe in Route in Laravel

Route::prefix('admin')->group(function () {
    Route::get('/users', function () {
        // Matches The "/admin/users" URL
    });
});
Perfect Plover

Routengruppencontroller Laravel

use App\Http\Controllers\OrderController;
 
Route::controller(OrderController::class)->group(function () {
    Route::get('/orders/{id}', 'show');
    Route::post('/orders', 'store');
});
Irfan

Ähnliche Antworten wie “Gruppe in Route in Laravel”

Fragen ähnlich wie “Gruppe in Route in Laravel”

Weitere verwandte Antworten zu “Gruppe in Route in Laravel” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen