comparison src/Traits/Filterable.php @ 2:b44434aaa767

Moving around the components. Made a big step in the right direction with the Builder and named joins being accessible.
author luka
date Wed, 18 Jun 2025 22:28:47 -0400
parents 56d9c64d64aa
children
comparison
equal deleted inserted replaced
1:56d9c64d64aa 2:b44434aaa767
3 namespace Wizard\Framework\Traits; 3 namespace Wizard\Framework\Traits;
4 4
5 trait Filterable 5 trait Filterable
6 { 6 {
7 protected static $filters = []; 7 protected static $filters = [];
8
9 // End goal: 'column_name' 'operator' 'value'
10 // string: name LIKE '%test%'
11 // value: id = 3
12 // date:
13 //
14 //
15 // table
16 // column
17 // operator ? based on the value?
18 // value
19 // required joins
20 //
21 8
22 public function scopeFilter($query, $validated) 9 public function scopeFilter($query, $validated)
23 { 10 {
24 $filters = static::$filters; 11 $filters = static::$filters;
25 12