cybercog / laravel-nova-ban

Laravel Nova Ban simplify blocking and banning Eloquent models.

Home Page:https://komarev.com/sources/laravel-nova-ban

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

example on using on a user resource?

codeitlikemiley opened this issue · comments

i tried doing something like this

Boolean::make('Banned')->resolveUsing(function ($user) { return $user->banned_at; }) ->exceptOnForms(),
but when i used actions , it is not reactive can u give example

Try this one:

Boolean::make('Is Active', 'banned_at')->values(false, true),

I think it's better display inversed value, to have red icon for banned users. It will be more obvious.