How do I force $users = User::all(); to returns also the deleted users? The ones with deleted_at NOT NULL?
$users = User::all();
$users = User::withTrashed()->get()
more information here https://laravel.com/docs/5.8/eloquent#querying-soft-deleted-models
Thank you, that’s perfect 🙂
You must be logged in to reply to this topic.
Support staff monitor the community forum and email 9 AM - 6 PM, Monday to Friday. Please be patient when posting an issue as staff may not be in the same timezone as you.