This commit is contained in:
2026-05-01 23:40:14 +08:00
commit b8f599a617
3867 changed files with 478663 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace Illuminate\Http\Resources;
use Illuminate\Support\Collection;
use JsonSerializable;
class MergeValue
{
/**
* The data to be merged.
*
* @var array
*/
public $data;
/**
* Create a new merge value instance.
*
* @param \Illuminate\Support\Collection|\JsonSerializable|array $data
*/
public function __construct($data)
{
$this->data = match (true) {
$data instanceof Collection => $data->all(),
$data instanceof JsonSerializable => $data->jsonSerialize(),
default => $data,
};
}
}