removal of unnecessary file, and composer update
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user