Ngt.php 585 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Dcat\Admin\Grid\Filter;
  3. use Illuminate\Support\Arr;
  4. class Ngt extends AbstractFilter
  5. {
  6. /**
  7. * {@inheritdoc}
  8. */
  9. protected $view = 'admin::filter.gt';
  10. /**
  11. * Get condition of this filter.
  12. *
  13. * @param array $inputs
  14. *
  15. * @return array|mixed|void
  16. */
  17. public function condition($inputs)
  18. {
  19. $value = Arr::get($inputs, $this->column);
  20. if ($value === null) {
  21. return;
  22. }
  23. $this->value = $value;
  24. return $this->buildCondition($this->column, '<=', $this->value);
  25. }
  26. }