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?
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?
Input::get()
is just a helper that maps to the Request class. It doesn't really matter which you use.I believe that Request is preferred in the context of a restful controller.
With Laravel 3 i prefer to use:
But with Laravel 4 I prefer to use:
Please check the article:
http://net.tutsplus.com/tutorials/php/laravel-4-a-start-at-a-restful-api/