<?php

namespace App\Filters;

use Essa\APIToolKit\Filters\QueryFilters;

class UnitFilters extends QueryFilters
{
    protected array $allowedFilters = [];

    protected array $columnSearch = [];

    public function status($status)
    {
        return $this->builder->when($status === "active", function ($query) {
            $query->withoutTrashed();
        })->when($status === "inactive", function ($query) {
            $query->onlyTrashed();
        });
    }
}
