Skip to content

Commit

Permalink
Merge pull request #1363 from JeRabix/patch-1
Browse files Browse the repository at this point in the history
chore:  ResourceModelQuery, add generic types
  • Loading branch information
lee-to authored Dec 9, 2024
2 parents e833c95 + 39c6cf0 commit 8bc0a03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Traits/Resource/ResourceModelQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/
trait ResourceModelQuery
{
/** @var TModel|null $item */
protected ?Model $item = null;

protected array $with = [];
Expand Down Expand Up @@ -102,6 +103,9 @@ protected function resolveItemQuery(): Builder
return $this->getModel()->newQuery();
}

/**
* @return TModel|null
*/
public function getItem(): ?Model
{
if (! is_null($this->item)) {
Expand Down

0 comments on commit 8bc0a03

Please sign in to comment.