You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-72Lines changed: 40 additions & 72 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,100 +18,68 @@ php artisan filament:assets
18
18
```
19
19
20
20
## Features
21
-
- ✅ Dark mode
22
-
- ✅ Search
23
-
- ✅ `BelongsTo` support
24
-
- ✅ `BelongsToMany` support
25
-
- ❌ Disabled options (Planned)
26
-
21
+
22
+
- Dark Mode: It seamlessly supports both Filament's light and dark modes out of the box.
23
+
- Search: Searching is fully supported, and it seamlessly searches through all levels within the tree structure.
24
+
- BelongsTo Integration: Establish connections within your data effortlessly.
25
+
- BelongsToMany Integration: Simplify the management of complex relationships through BelongsToMany integration.
26
+
27
+
🐛 One thing I have noticed about this project is that it tends to run a lot of queries, mainly because of its recursive design. Working to fix this in the upcoming updates.
28
+
27
29
## Usage
28
30
29
31
```PHP
32
+
// Create a tree based on a 'BelongsToMany' relationship
33
+
SelectTree::make('categories')
34
+
->relationship('categories', 'name', function ($query) {
35
+
return $query;
36
+
})
37
+
38
+
// Create a tree based on a 'BelongsTo' relationship
30
39
SelectTree::make('category_id')
40
+
->relationship('category', 'name', function ($query) {
41
+
return $query;
42
+
})
31
43
32
-
// Create a tree based on a `BelongsToMany` relationship
0 commit comments