Menggunakan Soft Delete di Laravel

Menambahkan deleted_at pada Tabel

php artisan make:migration add_soft_delete_on_users_table
php artisan migrate

Gunakan Trait Soft Delete di Model

Pengetesan

Mengambil Data yang Sudah Terhapus

Restore Data yang Sudah Terhapus

Menghapus Data Secara Permanen

--

--

Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store