Answers for "laravel route names"

PHP
7

laravel route list

php artisan route:list
Posted by: Guest on July-28-2020
2

laravel route namespace and prefix

Route::prefix('admin')->group(function () {
    Route::get('/users', function () {
        // Matches The "/admin/users" URL
    });
});
Posted by: Guest on December-15-2020
5

named route with parameter laravel

Route::get('/menu/{category}/{product}/{item}', ['as' => 'named.route' , 'uses' => 'MenuController@listItem']);

// to get the actual linke
route('named.route', ['category' => $category->id, 'product' => $product->id, 'item' => $item->id]);
Posted by: Guest on May-29-2020
2

laravel is route name

// Check if route is ***
Request::route()->named("YourRouteNameView")
Posted by: Guest on January-15-2021
1

laravel route namespace and prefix

Route::name('admin.')->group(function () {
    Route::get('/users', function () {
        // Route assigned name "admin.users"...
    })->name('users');
});
Posted by: Guest on December-15-2020
4

laravel route

Route::get('user/{id}', function ($id) {
    return 'User '.$id;
});
Posted by: Guest on April-22-2020

Browse Popular Code Answers by Language