Skip to content

Commit

Permalink
Merge pull request #2798 from mohamed-hendawy/fix-can-create
Browse files Browse the repository at this point in the history
[10.x] Make canCreate at QueryDataTable accept QueryBuilder only
  • Loading branch information
yajra authored Jun 21, 2022
2 parents 3b7f706 + 9096fc9 commit 40fd207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/QueryDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getConnection(): Connection
*/
public static function canCreate($source): bool
{
return $source instanceof QueryBuilder;
return $source instanceof QueryBuilder && ! ($source instanceof EloquentBuilder);
}

/**
Expand Down

0 comments on commit 40fd207

Please sign in to comment.