А в конце окажется, что отрабатывает не __invoke а другой метод )))
сравните url при работающей пагинации и когда не работает.
Illuminate\Database\Eloquent\Collection {#409 ▼
#items: array:3 [▼
0 => App\Models\Category {#410 ▼
#table: "categories"
#guarded: false
#connection: "mysql"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
+preventsLazyLoading: false
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#escapeWhenCastingToString: false
#attributes: array:5 [▼
"id" => 1
"title" => "kat"
"created_at" => "2023-06-28 07:20:52"
"updated_at" => "2023-06-28 07:20:52"
"deleted_at" => null
]
#original: array:5 [▶]
#changes: []
#casts: array:1 [▶]
#classCastCache: []
#attributeCastCache: []
#dates: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#hidden: []
#visible: []
#fillable: []
#forceDeleting: false
}
1 => App\Models\Category {#411 ▼
#table: "categories"
#guarded: false
#connection: "mysql"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
+preventsLazyLoading: false
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#escapeWhenCastingToString: false
#attributes: array:5 [▼
"id" => 2
"title" => "энергетика"
"created_at" => "2023-06-28 07:26:38"
"updated_at" => "2023-06-28 07:26:38"
"deleted_at" => null
]
#original: array:5 [▶]
#changes: []
#casts: array:1 [▶]
#classCastCache: []
#attributeCastCache: []
#dates: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#hidden: []
#visible: []
#fillable: []
#forceDeleting: false
}
2 => App\Models\Category {#412 ▼
#table: "categories"
#guarded: false
#connection: "mysql"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
+preventsLazyLoading: false
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#escapeWhenCastingToString: false
#attributes: array:5 [▼
"id" => 3
"title" => "троительство"
"created_at" => "2023-06-28 07:26:45"
"updated_at" => "2023-06-28 07:26:45"
"deleted_at" => null
]
#original: array:5 [▶]
#changes: []
#casts: array:1 [▶]
#classCastCache: []
#attributeCastCache: []
#dates: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#hidden: []
#visible: []
#fillable: []
#forceDeleting: false
}
]
#escapeWhenCastingToString: false
}
AllowedIPs = 0.0.0.0/0, ::/0
это верно?