Undefined variable $table while using table builder
Following this tutorial: https://filamentphp.com/docs/2.x/tables/getting-started#preparing-your-livewire-component
Im getting the error message:
Undefined variable $table
.
10 Replies
Because it's
$this->table
Seems this has a side-effect with the view, where I want to embed the component.
Im trying to render a table inside some tabs. But can not see what I am doing wrong...
Seems like you didn't completely follow the setup instructions.
Where are all the
getTable...()
methods?Ok, I was assuming they are already covered by the trait and I CAN just override them for individual config.
I'll try the full setup
Well, how should it know which columns and query you want if you don't specify anything? 🙈
I did now the full implemenation, but still get the same error 😦
When I change "Component" to Lifewire\Component, I can not use it in the form builder.
Wait you are using this inside a form? That doesn’t work. Also Filament form components aren’t Livewire components. Maybe try a table widget to show above or below the form
I created some tabs on The Circle/View page
class ViewCircle extends ViewRecord
, where I want to have the Dates in a separate tab.
How would you suggest so solve it? Should I create a Livewire component for ViewCircle instead ?
I was just using the protected function getFormSchema(): array
after generating the view pageYou can put tabs on that page and add the form to one and the table to the other but you cannot put a table inside a form.
Might be possible with v3
guess I got the point
thank for assistance