1Route::view('Url','PageName');
2//here Url is the call word which pass from url
3Route::get('Url',[Controller::class ,'FunctionName']);
4//from this route you can access function of specific
5//controller thourgh specific url route
6Route::get('Url/{id}',[Controller::class ,'FunctionName']);
7//if you want to pass specific id or any thing thorugh route you
8//can use it{id} or{name} or {anything} means anything you want to access
9
1Route::pattern('id', '[0-9]+');
2Route::get('user/{id}', function ($id) {
3 // Only executed if {id} is numeric...
4});
1Route::get('user/{id}/profile', function ($id) {
2 //
3})->name('profile');
4
5$url = route('profile', ['id' => 1, 'photos' => 'yes']);
6
7// /user/1/profile?photos=yes
1Route::view('/welcome', 'welcome');
2Route::view('/welcome', 'welcome', ['name' => 'Taylor']);