Want to access all of our courses? (30 h 09 min)
You also get:
Already a member? Login here
Hi Povilas,
I followed your vidoes about softdeletes, it works fine.
Contacts page
@foreach ($contacts as $contact) Name : {{ $contact->name }} <br> Mobile : {{ $contact->name }} <br> Company : {{ $contact->company->name ?? null }} <br> @endforeach
I need to show $contact->company->name value even if i deleted. How to solve this ??
Thank you.
In Controller, Contact::withTrashed('company') from what I remember. Or add withTrashed() when defining the company relationship in Contact model.
Contact::withTrashed('company') - This method not working.
Thanks
Tell us what you like or what we can improve
Feel free to share anything you like or dislike about this page or the platform in general.
Your feedback has been received. We truly appreciate you taking the time to help us improve.
Hi Povilas,
I followed your vidoes about softdeletes, it works fine.
Contacts page
I need to show $contact->company->name value even if i deleted. How to solve this ??
Thank you.
In Controller, Contact::withTrashed('company') from what I remember. Or add withTrashed() when defining the company relationship in Contact model.
Contact::withTrashed('company') - This method not working.
Thanks