novafieldcheckboxes
novafieldcheckboxes copied to clipboard
Error That Says String to Array Convertion Error
return [
ID::make(__('ID'), 'id')->sortable(),
Text::make('Title')->rules(['required']),
Trix::make('Body')->rules(['required']),
Boolean::make('Is Published'),
BelongsTo::make('User')->rules(['required']),
Checkboxes::make('Categories')->options(PostCategories::pluck('name')->toArray()),
Checkboxes::make('Tags')->options(PostTags::pluck('tag')->toArray()),
];
this is my migration
Schema::create('posts', function(Blueprint $table) {
$table->id();
$table->integer('user_id')->nullable(false);
$table->string('title')->nullable(false);
$table->string('tags');
$table->text('body')->nullable(false);
$table->string('category');
$table->string('is_published')->default(false);
$table->timestamps();
});
but after I click submit this shows up.
