1 | <?php |
||
9 | class NewsItemRepository |
||
10 | { |
||
11 | public static function getAll(): Collection |
||
15 | |||
16 | public static function getLatest(int $amount): Collection |
||
22 | |||
23 | public static function findById(int $id): NewsItem |
||
27 | |||
28 | public static function findBySlug(string $slug): NewsItem |
||
32 | |||
33 | /** |
||
34 | * @return \App\Models\NewsItem|null |
||
35 | */ |
||
36 | public static function findNext(NewsItem $newsItem) |
||
43 | |||
44 | /** |
||
45 | * @return \App\Models\NewsItem|null |
||
46 | */ |
||
47 | public static function findPrevious(NewsItem $newsItem) |
||
54 | |||
55 | public static function paginate(int $perPage): Paginator |
||
59 | } |
||
60 |