Yogesh Sawant
Yogesh Sawant

Reputation: 133

How to retrieve http get parameters in link in Laravel?

I am redirecting users from one laravel website to another for single authentication.

This is the redirect code in the website 1

return Redirect::to('http://example.com/login?param1=paramValue');

In website 2, I'm trying to get value of param1

$param1 = Input::get('param1');

but get() function is not returning the value.

IF I try Input::has('param1') , it returns false.

Can someone please guide me on what's going wrong with my code?

Upvotes: 4

Views: 4380

Answers (1)

Anshad Vattapoyil
Anshad Vattapoyil

Reputation: 23483

The code is working fine for me,

 $param1 = Input::get('param1');
 return $param1;

Just try to update your framework using composer update

Upvotes: 7

Related Questions