Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to get Retrieving the Request URI ?



How to get Retrieving the Request URI ?..

Answer / nafees ahmad

The “path” method is used to retrieve the requested URI.
The is method is used to retrieve the requested URI which matches the particular pattern specified in the argument of the method.
To get the full URL, we can use the url method.

Example :

Step 1 - Execute the below command to create a new controller called UriController. " php artisan make:controller UriController –plain " .
Step 2 - After successful execution of the URL, you will receive the following output.
Step 3 - After creating a controller, add the following code in that file. " app/Http/Controllers/UriController.php" .
Step 4 - Add the following line in the app/Http/route.php file. " app/Http/route.php".
Step 5 - Visit the following URL. " http://localhost:8000/foo/bar " .
Step 6 - The output will appear as shown on your screen.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

Is laravel support caching? Explain

0 Answers  


How do I disable csrf protection in laravel?

0 Answers  


How to install valet?

0 Answers  


What is meant by Authorization Mechanism in Laravel ?

1 Answers  


What is difference between single quote and double quote?

0 Answers  


How to create real time sitemap.xml file in laravel?

0 Answers  


What are the directory structure of laravel 5.8?

0 Answers  


How will you register service providers?

0 Answers  


What is laravel api rate limit?

0 Answers  


How to get Retrieving a Cookie in Laravel ?

1 Answers  


What do you mean by route groups used in laravel 5?

0 Answers  


How to create a controller in laravel?

0 Answers  


Categories