1 | <?php |
||
9 | class NewsItemRepository |
||
10 | { |
||
11 | public static function getAllOnline(): Collection |
||
17 | |||
18 | public static function getLatest(int $amount): Collection |
||
25 | |||
26 | public static function findOnline(int $id): NewsItem |
||
30 | |||
31 | public static function findByUrl(string $url): NewsItem |
||
37 | |||
38 | /** |
||
39 | * @return \App\Models\NewsItem|null |
||
40 | */ |
||
41 | public static function findNext(NewsItem $newsItem) |
||
48 | |||
49 | /** |
||
50 | * @return \App\Models\NewsItem|null |
||
51 | */ |
||
52 | public static function findPrevious(NewsItem $newsItem) |
||
59 | |||
60 | public static function paginate(int $perPage): Paginator |
||
64 | } |
||
65 |