update 1.0.8.0
Commits for version update
This commit is contained in:
@@ -72,17 +72,32 @@ class RedirectResponse extends BaseRedirectResponse
|
||||
{
|
||||
$input = $input ?: $this->request->input();
|
||||
|
||||
$this->session->flashInput($data = array_filter($input, $callback = function (&$value) use (&$callback) {
|
||||
if (is_array($value)) {
|
||||
$value = array_filter($value, $callback);
|
||||
}
|
||||
|
||||
return ! $value instanceof SymfonyUploadedFile;
|
||||
}));
|
||||
$this->session->flashInput($this->removeFilesFromInput($input));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all uploaded files form the given input array.
|
||||
*
|
||||
* @param array $input
|
||||
* @return array
|
||||
*/
|
||||
protected function removeFilesFromInput(array $input)
|
||||
{
|
||||
foreach ($input as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
$input[$key] = $this->removeFilesFromInput($value);
|
||||
}
|
||||
|
||||
if ($value instanceof SymfonyUploadedFile) {
|
||||
unset($input[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flash an array of input to the session.
|
||||
*
|
||||
|
||||
@@ -271,7 +271,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
|
||||
$input = $this->all();
|
||||
|
||||
foreach ($keys as $value) {
|
||||
if (! array_key_exists($value, $input)) {
|
||||
if (! Arr::has($input, $value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -338,7 +338,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a subset of the items from the input data.
|
||||
* Get a subset containing the provided keys with values from the input data.
|
||||
*
|
||||
* @param array|mixed $keys
|
||||
* @return array
|
||||
@@ -459,7 +459,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $default
|
||||
* @return \Symfony\Component\HttpFoundation\File\UploadedFile|array|null
|
||||
* @return \Illuminate\Http\UploadedFile|array|null
|
||||
*/
|
||||
public function file($key = null, $default = null)
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ trait ResponseTrait
|
||||
/**
|
||||
* Throws the response in a HttpResponseException instance.
|
||||
*
|
||||
* @throws Illuminate\Http\Exception\HttpResponseException;
|
||||
* @throws \Illuminate\Http\Exception\HttpResponseException
|
||||
*/
|
||||
public function throwResponse()
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylorotwell@gmail.com"
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
|
||||
Reference in New Issue
Block a user