Support the ongoing development of Laravel.io →
Database
Last updated 8 months ago.
0
moderator

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

0

You're probably trying to do mass assignment. Just add name field to $fillable.

It has nothing to do with soft deletes.

0

Sign in to participate in this thread!

Cloudways

Your banner here too?

Mayank scratchcodeio Joined 29 Dec 2020

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 Laravel.io - All rights reserved.