*/ class GuideCardRepository extends BaseRepository implements GuideCardRepositoryInterface { public function __construct(GuideCard $model) { parent::__construct($model); } /** * @param array $filters * @return LengthAwarePaginator */ public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator { return $this->model->newQuery() ->orderBy('order_index') ->paginate($perPage); } /** * @return Collection */ public function active(): Collection { return Cache::remember('guide_cards', 3600, fn () => $this->model->newQuery() ->where('is_active', true) ->orderBy('order_index') ->get()); } }