@if(!$opportunities->isEmpty()) @foreach($opportunities as $opportunity)
{{ $opportunity->account_name }}
Opportunity Value: SAR {{ $opportunity->estimated_budget }}
Owned By: {{ $opportunity->title.' '.$opportunity->firstname.' '.$opportunity->lastname }}
Current Status: {{ $opportunity->stage_title }}
Expected Closing: - {{ !empty($opportunity->opportunity_expiry) ? date('Y-m-d', strtotime($opportunity->opportunity_expiry)) : '' }}
@php($admin_uuids = DB::table('opportunity_teams')->where('opportunity_uuid', $opportunity->opportunity_uuid)->pluck('admin_uuid')->toArray()) @if(!empty($admin_uuids)) @php($admins = DB::table('admins')->whereIn('admin_uuid', $admin_uuids)->get()) @endif
Team Members
@if(!empty($admin_uuids) && !$admins->isEmpty()) @php($resultstr = array()) @foreach($admins as $admin) @php($name =$admin->title.' '.$admin->firstname.' '.$admin->lastname ) @php($resultstr[] = $name) @endforeach {{ implode(" , ",$resultstr) }} @else Team does not exist @endif
@endforeach @else

{{ trans('general.no_records') }}

@endif