TASSILI Docs
search
menu
TASSILI Docs
search
search
Field Checkbox
How to declare a Checkbox Field, it's the same way on update.
use Tassili\Crud\Fields\Checkbox;

Checkbox::make('is_active')
  ->value(true) // optional
  ->label('New Label') // optional
  ->readOnly() // optional, if you want the field only readable 
  ->notInDatabase() // optional, if you don't want this field in database

If you’re saving the boolean value using Eloquent, you should be sure to add a boolean cast to the model property:
use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    protected $casts = [
        'is_active' => 'boolean',
    ];
}