Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

laravel - use Request class or input class

In a restful controller, which class should I use to get passed variables?

$member->email = Input::get('email');
// or
$member->email = Request::get('email');

both options work for me, but whats the difference?

like image 427
Leabdalla Avatar asked Mar 27 '13 22:03

Leabdalla


1 Answers

Input::get() is just a helper that maps to the Request class. It doesn't really matter which you use.

like image 107
JeffreyWay Avatar answered Sep 18 '22 02:09

JeffreyWay