A Laravel Nova boolean field that can be directly edited from the index or detail page of a resource.
markrassamni/inline-boolean is a Laravel package for a laravel nova boolean field that can be directly edited from the index or detail page of a resource..
It currently has 16 GitHub stars and 163.252 downloads on Packagist (latest version v1.0.0).
Install it with composer require markrassamni/inline-boolean.
Discover more Laravel packages by markrassamni
or browse all Laravel packages to compare alternatives.
Last updated
Adds the ability to edit a boolean field directly from the index or detail page of a resource.


$ composer require markrassamni/inline-boolean
Use the MarkRassamni\InlineBoolean\InlineBoolean field in your Nova resource:
use MarkRassamni\InlineBoolean\InlineBoolean;
class MyResource extends Resource
{
public function fields(Request $request)
{
return [
InlineBoolean::make('Enabled')
->inlineOnIndex() // Use inline field on the index page
->inlineOnDetail() // Use inline field on the detail page
->enableMessage('Boolean has been enabled.') // Toast message when enabling boolean
->disableMessage('Boolean has been disabled.') // Toast message when disabling boolean
->trueText('Enabled') // Change the text describing true boolean values
->falseText('Disabled') // Change the text describing false boolean values
->showTextOnIndex() // Show true/false text beside the checkbox on the index page
];
}
}