Switcher change on list table #2341
Answered
by
tabuna
hoangnamitc
asked this question in
Q&A
-
Hello, How to change Switcher with change on database? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
tabuna
Aug 24, 2022
Replies: 2 comments 1 reply
-
thanks |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @hoangnamitc You can do it like this: ->render(function (Client $client) {
return CheckBox::make("users[$client->id]")
->sendTrueOrFalse()
->value($client->active);
}), Then by clicking on the button for example save in the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hoangnamitc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @hoangnamitc You can do it like this:
Then by clicking on the button for example save in the
commandBar
, you will be able to get a list of clients and their status for mass updating. If you want to make it a js ajax request, then you can do it yourself by adding your own stumulus controller for example.