Skip to content

Commit 40fd207

Browse files
authored
Merge pull request #2798 from mohamed-hendawy/fix-can-create
[10.x] Make canCreate at QueryDataTable accept QueryBuilder only
2 parents 3b7f706 + 9096fc9 commit 40fd207

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/QueryDataTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function getConnection(): Connection
8282
*/
8383
public static function canCreate($source): bool
8484
{
85-
return $source instanceof QueryBuilder;
85+
return $source instanceof QueryBuilder && ! ($source instanceof EloquentBuilder);
8686
}
8787

8888
/**

0 commit comments

Comments
 (0)