erp/app/Filters/GroupsFilter.php

24 lines
437 B
PHP
Raw Normal View History

2022-10-21 13:09:30 +08:00
<?php
namespace App\Filters;
class GroupsFilter extends Filters
{
protected function title($value)
{
return $this->builder->where('title', 'like', "%$value%");
}
protected function shopId($value)
{
if ($value) {
2023-04-17 18:56:59 +08:00
return $this->builder->where('shop_id', $value);
2022-10-21 13:09:30 +08:00
}
}
protected function status($value)
{
2023-04-17 18:56:59 +08:00
return $this->builder->where('status', $value);
2022-10-21 13:09:30 +08:00
}
}