Today now in this post i will show you How to Get Soft Deleted Records in Laravel? We are know that Laravel Eloquent provide us soft deleted feature. It is a awesome feature on that way laravel excluded the all soft delete record. So By default in Laravel Eloquent excludes the all the soft deleted records from the query results.
But if we want then we can get also the soft deleted record by using withTrashed() of the Laravel Eloquent. It will return us the all record from table.
So we can get the only soft deleted row by using onlyTrashed() of Laravel Eloquent.
Thanks for read. I hope it help you. For more you can follow us on facebook.