huo-zi/laravel-admin-ext-filter

Extend the laravel-admin Filter to group by rows.

v1.0.0 2022-06-20 08:14 UTC

This package is auto-updated.

Last update: 2024-10-27 07:34:41 UTC


README

A laravel-admin filter extension that enables multiple filters to be displayed on one row.

Installation

composer require huo-zi/laravel-admin-ext-filter

Usage

$filter->row('label_name', function (Filter $filter) {
  $filter->equal('col_foo', 'text_column');
  $filter->equal('col_bar', 'select_column')->select();
  $filter->equal('col_baz', 'time_filter')->date();
});

When you use filter presenter select, the default placeholder is trans('admin.choose'), you can use config to change it.

$filter->equal('col_bar')->select()->config('placeholder', 'select_label');

🚨 Not support filter presenter radio checkbox.

License

Licensed under The MIT License (MIT).