spunkylm/better-boolean

A slightly more customizable boolean field for Laravel Nova

Downloads

6

Stars

0

Version

Better Boolean

A drop in replacement for the default Laravel Nova Boolean field

Installation

composer require spunkylm/better-boolean

Usage

The Toggle has all the same options as the Boolean field so you can set the values to be stored in the Model.

BetterBoolean::make('Status')
    ->trueValue(true, 'Good', '#21b978')
    ->falseValue(false, 'Neutral', '#bdbdbd')
    ->showLabelOnIndex(),
spunkylm

Author

spunkylm