Skip to content

Commit

Permalink
Merge pull request #53 from sald19/main
Browse files Browse the repository at this point in the history
fix Attempted to lazy load [Model] on model
  • Loading branch information
pxlrbt authored Jan 23, 2025
2 parents 5b518a7 + 3e8c10e commit ddf57e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/ResourceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function searchRecord($query): EloquentCollection|Collection|array
{
$resource = $this->resource;
$searchQuery = $query;
$query = $resource::getEloquentQuery();
$query = $resource::getGlobalSearchEloquentQuery();

foreach (explode(' ', $searchQuery) as $searchQueryWord) {
$query->where(function (Builder $query) use ($searchQueryWord, $resource) {
Expand Down

0 comments on commit ddf57e3

Please sign in to comment.