Skip to content

Commit e5fd9a2

Browse files
committed
fix: update return type in getCustomFilters method to use Model
1 parent 5eb03f3 commit e5fd9a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Services/CategoryService.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use CSlant\Blog\Core\Http\Responses\Base\BaseHttpResponse;
77
use CSlant\Blog\Core\Models\Category;
88
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
9+
use Illuminate\Database\Eloquent\Model;
910
use Illuminate\Support\Arr;
1011

1112
/**
@@ -22,7 +23,7 @@ class CategoryService
2223
*
2324
* @param array<string, mixed> $filters
2425
*
25-
* @return LengthAwarePaginator<int, Category>
26+
* @return LengthAwarePaginator<int, Model>
2627
*/
2728
public function getCustomFilters(array $filters): LengthAwarePaginator
2829
{
@@ -38,6 +39,6 @@ public function getCustomFilters(array $filters): LengthAwarePaginator
3839
Arr::get($filters, 'order', 'desc')
3940
);
4041

41-
return $query->paginate($filters['per_page']);
42+
return $query->paginate((int) $filters['per_page']);
4243
}
4344
}

0 commit comments

Comments
 (0)