<?php

namespace App\Repositories;

use App\Models\Exercise;

class ExerciseRepository extends BaseRepository
{
    public function __construct(Exercise $model)
    {
        parent::__construct($model);
    }

    public function findBySlug($slug)
    {
        return $this->model->where('slug', $slug)->firstOrFail();
    }

    public function getPublished($premium = false)
    {
        return $this->model->where('is_premium', $premium)->get();
    }
}
