Answers for "laravel basic routing"

PHP
2

laravel routing techniques

Route::view('Url','PageName');
//here Url is the call word which pass from url
Route::get('Url',[Controller::class ,'FunctionName']);
//from this route you can access function of specific 
//controller thourgh specific url route
Route::get('Url/{id}',[Controller::class ,'FunctionName']);
//if you want to pass specific id or any thing thorugh route you 
//can use it{id} or{name} or {anything} means anything you want to access
Posted by: Guest on August-10-2021
4

laravel basic routing

Route::get('foo', function () {
    return 'Hello World';
});
Posted by: Guest on March-10-2020
0

laraval routing

Route::redirect('/here', '/there');
Posted by: Guest on January-15-2021

Browse Popular Code Answers by Language