Support the ongoing development of Laravel.io →
Requests Input Blade

I want to get Current url parameter in vie.

Let my url is mysite.com/public/user?page=2

Now I want get to only parameter like page=2 in view file.

Last updated 3 years ago.
0

Hi, unfortunately I'm not sure how to do this using a Laravel Facade but someone else might be able to help with that. If not the code below will work.

<?php echo $_GET['page']; ?>
Last updated 3 years ago.
0

Or the laravel way:

$segment = Request::segment(3);
Last updated 3 years ago.
0

psychonetic said:

Or the laravel way:

$segment = Request::segment(3);

Thanks psychotic, that will come in handy for me too!

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.