jesseleite / caravel

A lightweight CRUD layer for your Laravel sites.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature idea - Soft deletes

Harry-Torry opened this issue · comments

Are soft deletes (and maybe even a trash bin etc) out of the scope for this project?

Absolutely! You can add soft deletes in your migrations/models already. I just need to add UI into Caravel to view deleted/trash. Should probably hook that into ability/policy checks too. Great idea though.

Done! All you need to do is add $table->softDeletes() in your migration, and use SoftDeletes trait on your model, as per Laravel docs. If Caravel detects soft deletes on the model, you'll see these options:

example