Answers for "laravel use route in controller"

3

laravel route controller

use App\Http\Controllers\UserController;

Route::get('user/{id}', [UserController::class, 'show']);
Posted by: Guest on November-29-2020
5

route() and with() in laravel

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

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

// /user/1/profile?photos=yes
Posted by: Guest on May-30-2020
0

how to create route in laravel

Route::match(['get', 'post'], '/', function () {
    //
});
Posted by: Guest on May-13-2021

Code answers related to "laravel use route in controller"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language