本文整理汇总了PHP中Requests::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Requests::all方法的具体用法?PHP Requests::all怎么用?PHP Requests::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requests
的用法示例。
在下文中一共展示了Requests::all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
$isPost = $this->request->getMethod() === 'POST';
$src = $this->request->all();
$cmd = isset($src['cmd']) ? $src['cmd'] : '';
$args = [];
if (!$this->elFinder->loaded()) {
$this->output(['error' => $this->elFinder->error(elFinder::ERROR_CONF, elFinder::ERROR_CONF_NO_VOL), 'debug' => $this->elFinder->mountErrors]);
}
// telepat_mode: on
if (!$cmd && $isPost) {
$this->output(['error' => $this->elFinder->error(elFinder::ERROR_UPLOAD, elFinder::ERROR_UPLOAD_TOTAL_SIZE), 'header' => 'Content-Type: text/html']);
}
// telepat_mode: off
if (!$this->elFinder->commandExists($cmd)) {
$this->output(['error' => $this->elFinder->error(elFinder::ERROR_UNKNOWN_CMD)]);
}
// collect required arguments to exec command
foreach ($this->elFinder->commandArgsList($cmd) as $name => $req) {
$arg = $name == 'FILES' ? $_FILES : (isset($src[$name]) ? $src[$name] : '');
if (!is_array($arg)) {
$arg = trim($arg);
}
if ($req && (!isset($arg) || $arg === '')) {
$this->output(['error' => $this->elFinder->error(elFinder::ERROR_INV_PARAMS, $cmd)]);
}
$args[$name] = $arg;
}
$args['debug'] = isset($src['debug']) ? !!$src['debug'] : false;
return $this->output($this->elFinder->exec($cmd, $this->input_filter($args)));
}
示例2: store
public function store(Requests $request)
{
//este metodo recebe os parametros passasdos pelo formulario
//vamos pegar todos os parametros e armarzenar no banco de dados
User::create($request->all());
//armazena a mensagem
Flash::message("Produto adicionado com sucesso!");
//e em seguida redirecionar o usuario para a pagina com a lista dos produtos cadastrados
return redirect()->action('UserController@listar');
}