Closed sergeynilov closed 10 months ago
Why you use it in
$table ->columns
?
SelectTree is a filed and you must use it in $form or in table filters
This is not how it works, the SelectTree is a field for your forms or filters. Besides that it only supports BelongsTo
and BelongsToMany
. Take a look at the Filament documentation for some insights into forms. Also, consider checking out Laravel relations – it's worth a peek!
I need to make some tree with data based on datas from 3 db tables categories - has id, name fields, user_quiz_requests - has quiz_category_id and user_email fields users - has id, email fields
I tried to make a container resource with command :
php artisan make:filament-resource UserQuizRequestTree
I have installed "^3.1.18" on laravel 10.31.0 / filament ^3.0-stable app.
But inserting SelectTree into generated UserQuizRequestTreeResource.php file in “table” block:
I got error :
Method CodeWithDennis\FilamentSelectTree\SelectTree::table does not exist.
What must be a container for SelectTree component and how to start using it ?