-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
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();
});Metadata
Metadata
Assignees
Labels
No labels
