FilterableFilterable
Home
πŸ“¦ Installation
  • Setting Up Filterable
  • Discover Command
  • Listing All Filters
  • Testing Filters
  • Inspecting Filterable Classes
  • Caching
GitHub
Home
πŸ“¦ Installation
  • Setting Up Filterable
  • Discover Command
  • Listing All Filters
  • Testing Filters
  • Inspecting Filterable Classes
  • Caching
GitHub
  • Home
  • Introduction
  • Installation
  • Service Provider
  • How It Works
  • Engines

    • Invokable
    • Tree
    • Ruleset
    • Expression
  • Features

    • Lifecycle Hooks
    • Header-Driven Filter Mode
    • Auto Register Filterable Macro
    • Conditional Logic
    • Filter Aliases
    • Through callbacks
    • Auto Binding
    • Custom engines
    • Data Provisioning
  • Execution

    • Invoker
  • API Reference

    • Filterable
    • Filterable facade
    • Payload
    • Sorter
  • Caching

    • Overview
    • Getting Started
    • Strategies
    • Auto Invalidation
    • Cache Profiles
    • Scoping Cache
    • Monitoring Cached Items
    • API Reference
    • Examples
  • CLI

    • Setup Filterable
    • Discover Filters
    • Test Filter
    • List Filters
    • Inspect Filter
  • Exceptions
  • Event System
  • Profile Management
  • Profiler
  • Sorting
  • Authorization
  • Validation
  • Sanitization

Inspecting Filterable Classes

Purpose

The filterable:inspect command allows you to analyze and inspect the configuration of a specific Filterable class. It displays a summary of the filter’s settings β€” including its model, allowed fields and operators, data provisioning, validation rules, and more.

This is particularly useful for debugging or understanding how a filter is configured internally.


Usage

php artisan filterable:inspect {filter}

Arguments

ArgumentDescriptionExample
filterThe Filterable class name or alias you want to inspect.php artisan filterable:inspect PostFilter

Example

php artisan filterable:inspect PostFilter

Output Example:

πŸ” Inspecting: App\Http\Filters\PostFilter

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Property                   β”‚ Value                                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Model                      β”‚ Post                                         β”‚
β”‚ Allowed Fields             β”‚ title, content, status                       β”‚
β”‚ Allowed Operators          β”‚ =, !=, like, in                              β”‚
β”‚ Provided Data              β”‚ user, request                                β”‚
β”‚ Ignored Empty Value        β”‚ Yes                                          β”‚
β”‚ Strict Mode                β”‚ No                                           β”‚
β”‚ Engine                     β”‚ Invokable                                    β”‚
β”‚ Has Sanitizers             β”‚ Yes                                          β”‚
β”‚ Request Source             β”‚ query                                        β”‚
β”‚ Request Key                β”‚ filters                                      β”‚
β”‚ Validation Roles           β”‚ title, status                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Features

  • Displays all configuration details of a Filterable class in a clear table.
  • Supports both full class names (e.g. App\Http\Filters\PostFilter) and simple names (e.g. PostFilter).
  • Highlights important properties (like strict mode, sanitizers, etc.) using color for quick recognition.
  • Useful for debugging misconfigurations or verifying filter behavior.

Common Use Cases

  • Checking which fields and operators are currently allowed for a given filter.
  • Debugging unexpected filter behavior due to configuration mismatches.
  • Verifying data provisioning or engine setup.
  • Inspecting filters created by other developers on your team.

Notes

  • The command requires that the given class extends Kettasoft\Filterable\Filterable.
  • If the class cannot be found or is not a subclass of Filterable, the command will show an error message.
  • Works seamlessly with filters stored under app/Http/Filters (by default).

Sample Error

Filter class [UnknownFilter] not found.
Edit this page
Last Updated:
Contributors: kettasoft
Prev
List Filters