Skip to content

Commit 22ffed6

Browse files
authored
Merge pull request #1 from g3c0d3r5/fix-datatable-service-not-compatible-with-collection-problem
fix applyScopes method to support Collection
2 parents 6332449 + c3e58ee commit 22ffed6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Services/DataTable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,10 @@ public function __get(string $key)
713713
/**
714714
* Apply query scopes.
715715
*
716-
* @param EloquentBuilder|QueryBuilder|EloquentRelation $query
717-
* @return EloquentBuilder|QueryBuilder|EloquentRelation
716+
* @param EloquentBuilder|QueryBuilder|EloquentRelation|Collection $query
717+
* @return EloquentBuilder|QueryBuilder|EloquentRelation|Collection
718718
*/
719-
protected function applyScopes(EloquentBuilder|QueryBuilder|EloquentRelation $query): EloquentBuilder|QueryBuilder|EloquentRelation
719+
protected function applyScopes(EloquentBuilder|QueryBuilder|EloquentRelation|Collection $query): EloquentBuilder|QueryBuilder|EloquentRelation|Collection
720720
{
721721
foreach ($this->scopes as $scope) {
722722
$scope->apply($query);

0 commit comments

Comments
 (0)