Skip to content

Commit

Permalink
Merge pull request #17 from mahmoudmohamedramadan/development
Browse files Browse the repository at this point in the history
[1.x] Add the `fetchBuilder` method
  • Loading branch information
mahmoudmohamedramadan authored Dec 1, 2024
2 parents 0cd012b + 6456dd9 commit a0218c9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Updatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,19 @@ protected function setSearchOrUpdateQuery(bool $usingQueryBuilder = false)
}
}

/**
* Fetch the builder instance.
*
* @param bool $isQueryBuilder
* @return \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder
*
* @throws \Ramadan\EasyModel\Exceptions\InvalidModel
*/
public function fetchBuilder(bool $isQueryBuilder = false)
{
return $this->getSearchOrUpdateQuery(isQueryBuilder: $isQueryBuilder);
}

/**
* Fetch the result.
*
Expand Down

0 comments on commit a0218c9

Please sign in to comment.