This commit is contained in:
TiclemFR
2024-01-20 23:14:52 +01:00
parent a068f54957
commit 031f7071e6
881 changed files with 241469 additions and 247870 deletions

View File

@@ -78,7 +78,7 @@ class PendingRequest
/**
* The raw body for the request.
*
* @var string
* @var \Psr\Http\Message\StreamInterface|string
*/
protected $pendingBody;
@@ -259,7 +259,7 @@ class PendingRequest
/**
* Attach a raw body to the request.
*
* @param string $content
* @param \Psr\Http\Message\StreamInterface|string $content
* @param string $contentType
* @return $this
*/

View File

@@ -320,6 +320,10 @@ trait ConditionallyLoadsAttributes
*/
public function whenAggregated($relationship, $column, $aggregate, $value = null, $default = null)
{
if (func_num_args() < 5) {
$default = new MissingValue;
}
$attribute = (string) Str::of($relationship)->snake()->append('_')->append($aggregate)->append('_')->finish($column);
if (! isset($this->resource->getAttributes()[$attribute])) {