Laravel 4.2 可以用 Input::all() 獲取所有的輸入,get_class(new Input),可以找到Input位于:Illuminate/Support/Facades/Input
查看4.2的API文檔,并未發(fā)現(xiàn)有 all 方法,查看github源代碼
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'request';
}
原來是用了Laravel的門面,而且還有這么一行注釋
/**
* @see \Illuminate\Http\Request
*/
Request 里確實(shí)是有 all 方法的,所以Input可以用Request的所有方法??!