1. Go to this page and download the library: Download fourstacks/nova-checkboxes 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/ */
fourstacks / nova-checkboxes example snippets
namespace App\Nova;
use Fourstacks\NovaCheckboxes\Checkboxes;
// ...
class Member extends Resource
{
// ...
public function fields(Request $request)
{
return [
// ...
Checkboxes::make('Hobbies'),
// ...
];
}
}
namespace App;
// ...
class Member extends Model
{
protected $casts = [
'hobbies' => 'array'
]
}