“Laravel -API -Routen” Code-Antworten

Laravel Group Routen

Route::group(['prefix' => 'admin'], function () {
    Route::get('users', function ()    {
        // Matches The "/admin/users" URL
    });
});
Almabek

Laravel Routen -Namespace und Präfix

Route::name('admin.')->group(function () {
    Route::get('/users', function () {
        // Route assigned name "admin.users"...
    })->name('users');
});
Perfect Plover

Route () und mit () in Laravel

Route::get('user/{id}/profile', function ($id) {
    //
})->name('profile');

$url = route('profile', ['id' => 1, 'photos' => 'yes']);

// /user/1/profile?photos=yes
Lucky Loris

Laravel -Route

Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');
Sleepy Sandpiper

Setzen Sie den Routennamen Laravel

Route::get('/novanoticia', 'HomeController@getNovaNoticia')->name('route_name');
Route::get('/novanoticia', ['as' => 'route_name', 'uses' => 'HomeController@getNovaNoticia']);
Toukir_Ahmed

Laravel -API -Routen

Route::get($uri, $callback);
Route::post($uri, $callback);
Route::put($uri, $callback);
Route::patch($uri, $callback);
Route::delete($uri, $callback);
Route::options($uri, $callback);
Real Raven

Ähnliche Antworten wie “Laravel -API -Routen”

Fragen ähnlich wie “Laravel -API -Routen”

Weitere verwandte Antworten zu “Laravel -API -Routen” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen