@php
if($contact->type == "supplier"):
$supplier = \App\Models\Supplier::where("id", $contact->supplier_id)->first();
$logo = !empty($contact->logo) ? $contact->logo : $supplier->logo;
else:
$logo = $contact->logo;
endif;
if(empty($logo)):
$logo = url("/images/no_image.jpg");
endif;
@endphp
@if(!empty($logo))
@endif @php $name = $contact->type == "supplier" ? \App\Models\Supplier::where("id", $contact->supplier_id)->first()->name : $contact->name; @endphp
@if(!empty($contact->state))
@endif @php $website_url = $contact->website; if(false === strpos($website_url, "://")){ $website_url = "http://" . $website_url; } @endphp
Logo
@endif @php $name = $contact->type == "supplier" ? \App\Models\Supplier::where("id", $contact->supplier_id)->first()->name : $contact->name; @endphp
Name
{{ $name }}
Type
{{ ucfirst($contact->type) }}
@if(!empty($contact->state))
State
{{ strtoupper($contact->state) }}
@endif @php $website_url = $contact->website; if(false === strpos($website_url, "://")){ $website_url = "http://" . $website_url; } @endphp
Website
Notes
{{ $contact->notes }}
Main Contact
- Address : {{ $contact->address }}
- Email : {{ $contact->email }}
- Phone : {{ $contact->phone }}
Contacts
@if(!empty($contacts))
-
@foreach($contacts as $ct)
- @endforeach