<?php

namespace App\Filters;

use Essa\APIToolKit\Filters\QueryFilters;

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

    protected array $columnSearch = ["name", "code"];

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