EscolaLMS/Core

View on GitHub
src/Repositories/Traits/Activationable.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace EscolaLms\Core\Repositories\Traits;

use Illuminate\Support\Collection;

trait Activationable
{
    public function getActive(): Collection
    {
        return $this->model->newQuery()->where('is_active', true)->get();
    }
}