You probably have noticed that we have "Active" toggle in the table. Let's implement its behavior, so you could click on that Toggle to change the value immediately, without leaving the table page.
This is the expected result, visually:
You might have seen that in Categories migration we have a column is_active
, so we will change its value in the database.
First, we need a public property in the Livewire Component. It will be an array and called $active
...