Answers for "laravel route"

PHP
3

laravel get current route name

Route::currentRouteName()
Posted by: Guest on July-24-2020
3

laravel route

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

laravel route

Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');
Posted by: Guest on October-07-2020
0

laravel route

Route::view('/welcome', 'welcome');

Route::view('/welcome', 'welcome', ['name' => 'Taylor']);
Posted by: Guest on April-22-2020
0

laravel route

// laravel 8 routing

// get
Route::get('/users', [UserController::class, 'index']);

// resource
Route::resource('/users', UserController::class);
Posted by: Guest on September-25-2021
0

laravel route

Route::get('posts/{post}/comments/{comment}', function ($postId, $commentId) {
    //
});
Posted by: Guest on April-22-2020

Browse Popular Code Answers by Language