stephenjude/filament-blog

Add fillable property [blog_author_id, blog_category_id]

Closed this issue · 2 comments

sophy commented

Feature description

Please add both fields blog_author_id and blog_category_id into fillable of Post model. Because I got this error Illuminate\Database\Eloquent\MassAssignmentException

Add fillable property [blog_author_id, blog_category_id] to allow mass assignment on [Stephenjude\FilamentBlog\Models\Post].

I will suggest you unguard these models from the boot method of the AppServiceProvider class. Like this:

Post::unguard();
sophy commented

Thank you Stephen