Lead Id : {{$data->tracking_id}}Date: {{ date('m/d/Y', strtotime($data->created_at)) }}
Customer Info:
Name: {{ $data->customer->first_name }}
Email: {{ $data->customer->email }}
Phone: {{ $data->customer->phone }}
Employee Id: {{ $data->customer->customer_id }}
Lead Info:
Property Address: {{ $data->property->address }}
@if(isset($data->frequency) && count($data->frequency) > 0)
@foreach($data->services as $key => $row)
Services Name: {{ $row->name }}
@if(isset($data->frequency) && count($data->frequency) > 0)
Frequency: {{$row->type}}
@foreach($data->frequency as $frequency)
@if($frequency->scheduling_id == $row->pivot->scheduling_id)
Services Date: {{ date('d M Y', strtotime($frequency->date_service)) }}
Services Time: {{ date('d M Y', strtotime($frequency->time_service)) }}
@endif
@endforeach
@endif
@endforeach
@else
@foreach($data->leadservices as $key => $row)
Services Name: {{ $row->name }}
Services Name: {{ $row->name }}
@endforeach
@endif
Author Info':
Name: {{ $data->author->first_name }}
Email: {{ $data->author->email }}
Phone: {{ $data->author->phone }}
Employee Id: {{ $data->author->customer_id }}