Skip to content

Commit 1f0ee46

Browse files
author
Abdalrhman Emad Saad
committed
docs: Update docs
1 parent 7ccbd48 commit 1f0ee46

File tree

4 files changed

+14
-32
lines changed

4 files changed

+14
-32
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
home: true
33
title: Home
4-
heroImage: /logo.png
4+
heroImage: logo.png
55
actions:
66
- text: Introduction
77
link: /introduction

docs/features/header-driven-filter-mode.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ When `fallback_strategy = 'error'`:
7575
### Per-Query Selection
7676

7777
```php
78-
Filterable::make(Product::query)->withHeaderDrivenMode();
78+
Filterable::create()->filter(Product::query())->withHeaderDrivenMode([...]);
7979
```
8080

8181
#### Method Reference
@@ -97,18 +97,7 @@ withHeaderDrivenMode(array $config)
9797
'allowed_engines' => ['dynamic', 'tree']
9898
```
9999

100-
## Important Notes
101-
102-
### Closure Engine Limitation
103-
104-
::: warning Warning
105-
Header-driven mode **cannot** be used with [**Closure Pipeline Engine**](engines/closure) because:
106-
107-
- Closures cannot be serialized in headers
108-
- Runtime pipeline modifications require code-level changes
109-
:::
110-
111-
#### Security Considerations
100+
## Security Considerations
112101

113102
- Always whitelist allowed engines in production
114103
- Consider rate limiting header modifications

docs/how-it-works.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Each **engine** encapsulates a distinct filtering strategy — allowing you to c
66

77
## Engine Overview
88

9-
| Engine | Description |
10-
| --------------------------------------- | ------------------------------------------------------------------------------------------------------ |
11-
| [`Ruleset`](/engines/ruleset) | Applies a flat array of key-operator-value pairs. Best for simple APIs or when using query strings. |
12-
| [`Invokable`](/engines/dynamic-methods) | Maps each filter key to a method on your filter class. Great for encapsulating filter logic per field. |
13-
| [`Expression`](/engines/sql-expression) | Global callback to handle raw SQL filtering expressions dynamically. |
14-
| [`Tree`](/engines/tree-based) | Supports nested and grouped logical filtering (`AND` / `OR`), ideal for advanced search scenarios. |
9+
| Engine | Description |
10+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------ |
11+
| [`Ruleset`](engines/rule-set) | Applies a flat array of key-operator-value pairs. Best for simple APIs or when using query strings. |
12+
| [`Invokable`](engines/invokable) | Maps each filter key to a method on your filter class. Great for encapsulating filter logic per field. |
13+
| [`Expression`](engines/expression) | Flexible and expressive filtering engine designed to handle both flat and deeply nested filters. |
14+
| [`Tree`](engines/tree) | Supports nested and grouped logical filtering (`AND` / `OR`), ideal for advanced search scenarios. |
1515

1616
---
1717

docs/sanitization.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ To enable sanitization in your filter class,
99
define a `protected $sanitizers` property.
1010
Each entry in this array maps a **request key** to one or more sanitizer classes.
1111

12-
## Important Note
13-
14-
::: danger Important Node
15-
The [**Closure Pipeline Engine**](/engines/closure) dose **not** og through any [sanitization](sanitization) or [validation](validation) processes.
16-
Ensuer that you manually handle input validation and security checks when using closures in filter logic to avoid unexpected behavior or security vulnerabilities.
17-
:::
18-
1912
## Basic Example
2013

2114
```php
@@ -51,11 +44,11 @@ You can apply multiple sanitizers to the same field by using array:
5144

5245
```php
5346
protected $sanitizers = [
54-
'title' => [
55-
TrimSanitizer::class,
56-
CapitalizeSanitizer::class
57-
]
58-
];
47+
'title' => [
48+
TrimSanitizer::class,
49+
CapitalizeSanitizer::class
50+
]
51+
];
5952
```
6053

6154
Sanitizers are applied **in the order defined**.

0 commit comments

Comments
 (0)