File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1616 "laravel/framework" : " ^8.0|^9.0" ,
1717 "laravel/passport" : " ^10.1.0" ,
1818 "spatie/laravel-permission" : " ^3.2" ,
19- "spatie/laravel-query-builder" : " ^2.3|^3.0|| ^4.0|^5.0" ,
19+ "spatie/laravel-query-builder" : " ^2.3|^3.0|^4.0|^5.0" ,
2020 "phpdocumentor/reflection-docblock" : " ^4.3|^5.0" ,
2121 "lcobucci/jwt" : " ^4.0" ,
2222 "league/oauth2-server" : " ^8.3.2"
Original file line number Diff line number Diff line change 55use Cronqvist \Api \Exception \ApiAuthorizationException ;
66use Cronqvist \Api \Services \Auth \Utils ;
77use Cronqvist \Api \Services \Helpers \GuessForModel ;
8+ use Cronqvist \Api \Services \QueryBuilder \QueryBuilder ;
89use Illuminate \Auth \Access \AuthorizationException ;
910use Illuminate \Auth \AuthenticationException ;
1011use Illuminate \Database \Eloquent \Builder ;
@@ -95,7 +96,8 @@ protected function defaultIndex()
9596 {
9697 $ this ->authorizeMethod ('index ' );
9798 $ data = [];
98- if (($ builder = $ this ->getBuilder ()) instanceof Builder) {
99+ $ builder = $ this ->getBuilder ();
100+ if ($ builder instanceof QueryBuilder || $ builder instanceof Builder) {
99101 $ data = $ this ->perPage > 0
100102 ? $ builder ->paginate ($ this ->getPerPage ())
101103 : $ builder ->get ();
You can’t perform that action at this time.
0 commit comments