You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 More fixes 🆙
This commit is contained in:
@@ -8,9 +8,13 @@ use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
class ArticleService
|
||||
{
|
||||
public function getArticles(bool $paginate = false, int $perPage = 8): array|Collection|LengthAwarePaginator
|
||||
/**
|
||||
* @return Collection<int, WebsiteArticle>|LengthAwarePaginator<int, WebsiteArticle>
|
||||
*/
|
||||
public function getArticles(bool $paginate = false, int $perPage = 8): Collection|LengthAwarePaginator
|
||||
{
|
||||
$query = WebsiteArticle::with(['user' => function ($query): void {
|
||||
/** @var \Illuminate\Database\Eloquent\Builder $query */
|
||||
$query->select('id', 'username', 'look');
|
||||
}])->orderByDesc('id');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user