Skip to content

Commit

Permalink
Convert to non-static
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 authored Oct 10, 2024
1 parent 70da2eb commit 39a81d2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Models/Concerns/WithQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ public function bootWithQueryBuilder(): void
$this->authorize('viewAny', $this->getModelClass());
}

protected static function getModelClass(): ?string
protected function getModelClass(): ?string
{
return static::$model;
}

protected static function getModel(): Model
protected function getModel(): Model
{
return app(static::getModelClass());
return app($this->getModelClass());
}

protected static function getQuery(): Builder
protected function getQuery(): Builder
{
return static::getModel()->newQuery();
return $this->getModel()->newQuery();
}

protected static function getScout(string $query = '*', ?Closure $callback = null): ScoutBuilder
protected function getScout(string $query = '*', ?Closure $callback = null): ScoutBuilder
{
return static::getModel()->search($query, $callback);
return $this->getModel()->search($query, $callback);
}
}

0 comments on commit 39a81d2

Please sign in to comment.