stephenjude / filament-blog

A faceless blog content manager with configurable richtext and markdown support for filament admin panel
MIT License
147 stars 34 forks source link

Add fillable property [blog_author_id, blog_category_id] #26

Closed sophy closed 1 year ago

sophy commented 1 year ago

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].

stephenjude commented 1 year ago

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

Post::unguard();
sophy commented 1 year ago

Thank you Stephen