File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ Version 0.5.1 - Jan 3, 2021
2+ ----------------------------
3+ - Fix: error in argument validation in Pagination
4+
5+
16Version 0.5.0 - Jan 3, 2021
27----------------------------
38- New: added config file
Original file line number Diff line number Diff line change 2121use Illuminate \Pagination \LengthAwarePaginator ;
2222use Jenssegers \Agent \Agent ;
2323use Illuminate \Database \Eloquent \Relations \Relation ;
24- use http \ Exception \ InvalidArgumentException ;
24+ use Illuminate \ Database \ Eloquent \ Builder ;
2525
2626
2727class Pagination
@@ -204,8 +204,8 @@ public static function renderLinks()
204204 */
205205 protected static function guardIsRelationObject ($ query = null )
206206 {
207- if ( ! ($ query instanceof Relation)) {
208- throw new InvalidArgumentException ('Wrong type of object: $query ' );
207+ if ( ! ($ query instanceof Relation || $ query instanceof Builder )) {
208+ throw new \ InvalidArgumentException ('Wrong type of object: $query ' );
209209 }
210210 }
211211
You can’t perform that action at this time.
0 commit comments