TomatoPHP
Join CommunityGitHubDiscord
  • 🚀Overview
  • 🏅Support
  • 🤝Contributing
  • 🛣️Screenshots
  • Get Started
    • 🔥Environment Setup
      • 💿Configuring the server
      • 📡Install Valet
      • 🎟️Install PHPMyAdmin
    • 🚀Install
    • ✨Start Your First CRUD
  • Tomato Admin
    • 🚀Get Started
    • 🧠Install
    • 🛗Generate CRUD
    • 👓Slots
    • 🌉Widgets
    • 📖Menus
    • 🔁Requests
      • 🔁Index Request
      • 🔁JSON Request
      • 🔁Get Request
      • 🔁Store Request
      • 🔁Update Request
      • 🔁Destroy Request
    • 🎹Inputs
      • 🔆Rich Text Editor
      • 📞Phone Editor
      • 🖌️Color Switcher
      • 🔁Inputs Repeater
      • 💧Draggable
      • 👨‍💻Code Editor
      • ⚡Select Input
      • 🔚Submit
      • 🧾Items
      • 🔍Search
      • 🚁Icon
    • 🗜️Components
      • 🔗Relation Manager
      • 🧊Container
      • 👁️View Row
      • 🌉Widget
      • 🔘Button
      • 📖Menu
      • 👾Tooltip
      • ©️©️ Clipboard
      • 🛣️Slider
      • ℹ️Action Buttons
      • 🍅Application Logo
      • 🔽Dropdown
      • ⏸️Paginator
    • 📑Table
      • ✅Bulk Actions
      • 🗄️Filters
      • 🦘Slots
    • 🔓Jetstream & Fortify
    • 🆕Upgrade
  • Tomato PHP
    • 🚀Get Started
    • 🎹Use
  • Plugins
    • 🔌Get Started
    • 🏗️Create New Plugin
    • 🔓Tomato Roles
      • 📐Use
      • 🔏Developer Gate
      • 🏗️Register Permission
      • 💽Config
    • 🌎Tomato Locations
      • 🔁APIs
    • ⚙️Tomato Settings
      • 📐Use
      • 💽Config
    • 🔔Tomato Notifications
      • 📐Use
      • 🏗️Notification Service
      • 💽Config
      • 🔁APIs
    • 🔷Tomato Category
      • 📐Use
      • 💽Config
      • 🔁APIs
    • ✨Tomato Forms
      • 📐Use
      • 💽Config
      • 🔁APIs
    • 📖Tomato Menus
      • 📐Use
      • 💽Config
    • 👨‍💼Tomato CRM
      • 📐Use
      • 🏗️Auth Builder
      • 🔥Events
      • 💽Config
      • 🔁APIs
    • 💳Tomato Wallet
      • 📐Use
      • 🗂️Payment Methods
      • 💽Config
      • 🔁APIs
    • 📃Tomato CMS
      • 📐Use
      • 💽Config
    • 🎧Tomato Support
      • 📐Use
      • 💽Config
      • 🔁APIs
    • 👜Tomato Products
      • 💿Config
      • 🌆Screenshots
    • 💯Tomato Coupons
      • 💿Config
      • 🌆Screenshots
    • 🚀Tomato Orders
      • 💿Config
      • 🌆Screenshots
    • 🛍️Tomato Ecommerce
      • 🎭Install E-commerce Theme
      • 💿Config
      • 🌆Screenshots
    • 🚛Tomato Inventory
      • 💿Config
    • 🧾Tomato POS
      • 💿Config
    • 📄Tomato Invoices
      • 💿Config
    • 🏬Tomato Subscription
      • 📐Use
      • 💽Config
    • 🧪Tomato Dusk
      • 📐Use
      • 💿Config
      • 🌆Screenshots
    • ⚔️Tomato Chat
      • 🏗️Setup
      • 📐Use
      • 💽Config
    • 📱Tomato Flutter
      • 📐Use
      • 🧲Generate CRUD
      • 🚀Change Endpoint
      • ⏩Tomato Froms
      • 🛣️Screenshots
    • 🏗️Tomato Builder
      • 🧠Install
      • 🖍️Use
      • 🌆Screenshots
      • 💿Config
    • 🏗️Tomato Sections
      • 💿Config
    • 🎭Tomato Themes
      • 🏂Create New Theme
      • 🏗️Theme Builder
      • 🛍️Install E-commerce Theme
      • 💿Config
    • 📠Tomato Eddy
      • 💿Config
    • 👨‍💻Tomato User Activities
      • 💿Config
    • 👨‍💼Tomato PMS
    • ✅Tomato Tasks
    • ⌛Tomato Timer
    • ✈️Tomato API
    • 🚦Tomato Figma
    • 🌟Tomato SaaS
    • 🔤Tomato Translations
    • 👨‍💻Tomato Artisan
    • 🎒Tomato Backup
    • 📂Tomato Browser
    • 📕Tomato Logs
  • Helpers
    • 🍕Laravel Console Helpers
    • 📽️Laravel Agora
    • 💿Laravel Package Generator
  • Filament
    • 🌎Try Plugins
    • 👨‍🏭Filament Users
      • 🛣️Screenshots
      • 🏗️Installation
      • 🛡️Integration
      • 💼Use Facade Class
      • 📢Publish Assets
    • 🌎Filament Translations
      • 🛣️Screenshots
      • 🏗️Installation
      • 🇪🇬Language Switcher
      • 👨‍💻Command Line
      • 🔧Queue
      • 🔘Buttons
      • 🤖AI Integration
      • 🌠Import & Export
      • 📢Publish Assets
    • ⚙️Filament Settings Hub
      • 🛣️Screenshots
      • 🏗️Installation
      • ▶️Usage
      • 📢Publish Assets
    • 🍔Filament Menus
      • 🏗️Installation
      • 🛣️Screenshots
      • ⏩Use as Filament Navigation
      • ⏯️Use as a Livewire Component
      • 📢Publish Assets
    • 🆎Filament Types
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Register New Type
      • 🎹Use Type Helper
      • 🔄Use Type Column
      • 📢Publish Assets
    • 🔌Filament Plugins
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • ®️®️ List your package on the plugins list
      • 📶Use Selected Module in your panel
      • 🏂Get Only Current Panel Plugins
      • 🛑Stop Auto Discover Module Resources
      • 🎸Stop Using Plugins UI
      • 📢Publish Assets
    • 🦄Filament Icons
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 🪄Add Custom Icons
      • 📢Publish Assets
    • 🗺️Filament Locations
      • 🛣️Screenshots
      • 🏗️Installation
      • 📢Publish Assets
    • 📢Filament Alerts
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 🔥Firebase Integration
      • 🔗Slack Integration
      • 🔗Discord Integration
      • ⚙️API
      • 📢Publish Assets
    • 🦸‍♂️Filament Accounts
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 🎇Use Accounts as SaaS Panel
      • 🍫Use Account Column
      • 🔔Use Notifications
      • 🗺️Use Account Locations
      • 🅰️Use Filament Types
      • 🔏Use Filament Impersonate
      • 🏢How to use a builder
      • ✌️Custom validation
      • 🆕Attach New Field
      • 🎌Attach Relation
      • 🔘Attach Table Button
      • 🛁Auth Events
      • ⚙️APIs
    • 💰Filament Wallet
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 🏁Filament Accounts Integration
      • 📢Publish Assets
    • ✨Filament Splade
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 📢Publish Assets
    • 🔐Filament Developer Gate
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 📢Publish Assets
    • 🏛️Filament Helpers
      • 🏗️Installation
      • ⏯️Using
    • 👨‍💻Filament Artisan
      • 🛣️Screenshots
      • 🏗️Installation
      • 🏃‍♂️Running command
      • ⚙️Configuration
      • 📢Publish Assets
    • 📂Filament Browser
      • 🛣️Screenshots
      • 🏗️Installation
      • 📢Publish Assets
    • 🔥Filament FCM
      • 🏗️Installation
      • ⏯️Usage
      • 📢Publish Assets
    • 🖊️Filament CMS
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Custom Type
      • ⏯️Custom Author Type
      • 📺Youtube Integration
      • 🏩Behance Integration
      • 🎭Theme Manager
      • 🏨Page Builder
      • 🔡Form Builder
      • 📢Publish Assets
    • 🔗Filament API
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 📢Publish Assets
    • 👜Filament Ecommerce
      • 🛣️Screenshots
      • 🏗️Installation
      • 🎁Use Coupon Service
      • 📢Publish Assets
    • 🔚Filament Twilio
      • 🏗️Installation
      • ⏯️Using
      • 📢Publish Assets
    • ⚔️Filament Discord
      • 🛣️Screenshot
      • 🏗️Installation
      • ⏯️Using
      • 🦸‍♂️Send to Selected User
      • ⚡Allow Discord Error Logger
      • 📢Publish Assets
    • 🆎Filament Translation Component
      • 🛣️Screenshot
      • 🏗️Installation
      • ⏯️Using
      • 📢Publish Assets
    • 📒Filament Notes
      • 🛣️Screenshot
      • 🏗️Installation
      • ⏯️Using
      • 📢Publish Assets
    • 📼Filament Media Manager
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Use Component
      • 🅰️Add Custom Type
      • 📂Allow Sub Folders
      • 🦸‍♂️Allow User Access
      • 🎇Folders API
      • 📢Publish Assets
    • 💳Filament Withdrawals
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Custom Author Type
      • 🔡Form Builder
      • 📢Publish Assets
    • 🧾Filament POS
      • 🌄Screenshots
      • 🏗️Installation
      • 📢Publish Assets
  • Learn
    • 🛍️Build E-Commerce
    • 🙏Task To Get Start
    • 🔴Use Github
    • 🔥Deploy Laravel App Using GitHub Actions
      • 🏯Install Cloudpanel
      • 🔓Link Cloudflare
      • 🔃Clone Repo
      • 🎇Workflow
      • 🦕Deploy Script
    • 🦄Awesome TailwindCSS
    • 💻Terminal
Powered by GitBook
On this page
  • Boolean Filter
  • Date Filter
  • Select Filter With Remote Data
  • Override Filter Auto Query

Was this helpful?

Edit on GitHub
  1. Tomato Admin
  2. Table

Filters

PreviousBulk ActionsNextSlots

Last updated 1 year ago

Was this helpful?

there is a limitation on a filtering table inside so we added more features to the filters inside Splade Table

Boolean Filter

I think we all need a filter with a boolean inside our tables to get active users or any boolean value filter, so we added a new filter method to Splade Table

you can use it like this

->boolFilter(
    key: 'is_active',
    label: __('Activated')
);

Date Filter

as we go we need to filter a table by date range from to, so we add auto data filter to filter your records by created_at filed form, to. just in one line

->dataFilter();

you can custom it by using another like updated_at

->dateFilter(
    key: 'updated_at', 
    label: __('Updated At')
);

Select Filter With Remote Data

is the feature we all need to get data from the remote URL inside the table filter, we make this happen we adding a new method to the table with more features.

you can use this selected like this

->selectFilter(
    key: 'account_id',
    label: __('Account'),
    remote_root: 'data',
    remote_url: route('admin.accounts.index'),
    option_label: 'name',
    option_value: 'id',
);

Override Filter Auto Query

as we know when we change the table filter it does the magic of filtering without any logic for this filter, but sometimes we need to do some extra custom query when the filter changes, so we add a new attribute inside all types of filters to do this.

you can use it like this.

->selectFilter(
    key: 'account_id',
    label: __('Account'),
    remote_root: 'data',
    remote_url: route('admin.accounts.index'),
    option_label: 'name',
    option_value: 'id',
    applyQuery: false
);

📑
🗄️
Splade table