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 ?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to install and start, stop mysql on valet?

742


What is singleton design pattern in laravel?

741


Please explain the difference between laravel and codeigniter?

773


How to assign a variable value for all view file?

696


How to generate application key in laravel?

832


What is escape string?

786


What is mvc framework?

851


Explain, how to get current environment in laravel 5?

744


What is closure in laravel?

775


What is blade php in laravel?

867


What is laravel contract?

789


What is console in laravel?

797


How can I install laravel in windows?

791


What are the software’s included in laravel homestead?

776


How to create model controller and migration in a single artisan command in laravel?

728