How to pass URL param in Laravel

0 votes
How can i display the prameter which i had passed in the URL and get in the view ?
Mar 18, 2020 in Laravel by kartik
• 37,520 points
5,211 views

1 answer to this question.

0 votes

Hello,

First you have to go to routes folder of Laravel then web.php and in web.php you have to create routes to the page you want. Here i have created route for page youtube.

Now after creating route for youtube page you have to create that youtube page

So,in order to create youtube page go to resources and then views and then create new file named as youtube.blade.php and make service as you want.

Now go the the local browser and type localhost/101 (NOTE here 101 is parameter you can add your own parameter)

answered Mar 18, 2020 by Niroj
• 82,840 points

Related Questions In Laravel

0 votes
1 answer

How to pass CSRF token with ajax request in Laravel?

Hey, In between head, tag put <meta name="csrf-token" ...READ MORE

answered Mar 24, 2020 in Laravel by Dey
39,882 views
0 votes
1 answer

How to pass data to view in Laravel?

Hello @kartik, You can pass data to the ...READ MORE

answered Sep 11, 2020 in Laravel by Niroj
• 82,840 points
744 views
0 votes
1 answer

How to Get the Current URL Inside @if Statement in Laravel?

Hello @kartik, You can use: Request::url() to obtain the current ...READ MORE

answered Nov 11, 2020 in Laravel by Niroj
• 82,840 points
4,026 views
0 votes
1 answer

How can I pass parameter from Route to Filter in laravel?

Hii, Filters can be passed parameters, like the ...READ MORE

answered Dec 4, 2020 in Laravel by Niroj
• 82,840 points
3,008 views
0 votes
1 answer

What is Laravel framework? Why one should use Laravel?

Laravel is a PHP web-framework; it utilized ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,840 points
1,701 views
0 votes
1 answer

How to download and install Lavavel framework?

Hey @kartik, First you must have xampp install ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,840 points
1,493 views
0 votes
1 answer

How can we get started with Laravel through Xampp?

Hii, First you need to start Apache and ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,840 points
1,046 views
0 votes
1 answer

What are the important directories used in a common Laravel application

Hey @Kartik. Directories used in a common Laravel ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,840 points
2,475 views
0 votes
1 answer

How to pass data through URL and access through controller in Laravel?

Hello, You can  first refer how to  Create controller through ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
11,930 views
0 votes
1 answer

How to pass data to mail View in laravel Mail send?

Hello @kartik, Send data like this. $data = [ ...READ MORE

answered Jul 30, 2020 in Laravel by Niroj
• 82,840 points
7,948 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP