PHP code example of jankapusta / nova-boolean-multi-status-field
1. Go to this page and download the library: Download jankapusta/nova-boolean-multi-status-field library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jankapusta / nova-boolean-multi-status-field example snippets
$table->json('car_multi_status');
class Car extends Model {
protected $casts = [
'car_multi_status' => 'array',
];
// ....
}
Car::create([
'car_multi_status' => [
'break_check' => true,
'windows_check' => false,
'engine_check' => true,
],
]);
BooleanMultiStatus::make('Car checks', 'car_multi_status')
// optional configuration
->showKeysAsTooltips(false) // to hide tooltips
->width(80), // in pixels