Hello Mayank,
You don't need to add the deleted_at to the dates array, the trait will handle that for you.
I'm not sure what your problem is, I see your model and migration but no code how you use it.
If you use a create/update using a mass assignment you need to add the name field to your $fillable array. Else it will not filled. Maybe is that part of your question.
Did you find the documentation about soft deletes? https://laravel.com/docs/8.x/eloquent#soft-deleting
You're probably trying to do mass assignment. Just add name
field to $fillable
.
It has nothing to do with soft deletes.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community