我一直在网上搜索如何在控制器中获取POST数据,到目前为止我找到了两个解决方案:Input::get()和$_POST.
Input::get()阅读评论:
/**
Run Code Online (Sandbox Code Playgroud)* Gets a "parameter" value. * * This method is mainly useful for libraries that want to provide some flexibility. * * Order of precedence: GET, PATH, POST * * Avoid using this method in controllers: * * * slow * * prefer to get from a "named" source * * It is better to explicitly get request parameters from the appropriate * public property instead (query, attributes, request). * * @param …
$_GET在Laravel中是否有更好的方式来访问而不是变量本身,还是它?
我需要API的多个参数 /users?q=keyword&order=desc&limit=5
是否有更清洁,更安全和Laravel-ish方式来访问$ _GET值?
谢谢.