removal of unnecessary file, and composer update

This commit is contained in:
2019-01-09 23:31:31 -06:00
parent a90688deb6
commit e4380f2ffe
604 changed files with 32070 additions and 26824 deletions
@@ -243,6 +243,17 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
return $this->headers->get('X-PJAX') == true;
}
/**
* Determine if the request is the result of an prefetch call.
*
* @return bool
*/
public function prefetch()
{
return strcasecmp($this->server->get('HTTP_X_MOZ'), 'prefetch') === 0 ||
strcasecmp($this->headers->get('Purpose'), 'prefetch') === 0;
}
/**
* Determine if the request is over HTTPS.
*
@@ -2,6 +2,7 @@
namespace Illuminate\Http\Resources;
use JsonSerializable;
use Illuminate\Support\Collection;
class MergeValue
@@ -21,6 +22,12 @@ class MergeValue
*/
public function __construct($data)
{
$this->data = $data instanceof Collection ? $data->all() : $data;
if ($data instanceof Collection) {
$this->data = $data->all();
} elseif ($data instanceof JsonSerializable) {
$this->data = $data->jsonSerialize();
} else {
$this->data = $data;
}
}
}