Notificaciones CRM DEBUG

@php use App\InteractionType; use App\Interaction; $interactions = InteractionType::get(); use App\ResultType; $resulttype = ResultType::get(); use App\Message; $messages = Message::get(); use App\Applicant; $applicants = Applicant::get(); use Carbon\Carbon; $today = Carbon::today()->format('d-m-Y'); $pendings = Interaction::whereDate('notification_date', '=', Carbon::today()->toDateString())->get(); $pendings = $pendings->toArray(); @endphp @if (!empty($pendings))

Interacciones pendientes de hoy:

@foreach ($pendings as $pending) @php $applicant = Applicant::where('id','=',$pending['applicant_id'])->orderBy('created_at', 'desc')->first(); $applicant = $applicant->toArray(); $interaction_type = InteractionType::where('id','=',$pending['interaction_type_id'])->orderBy('created_at', 'desc')->first(); $result_type = ResultType::where('id','=',$pending['result_id'])->orderBy('created_at', 'desc')->first(); $tmp_date = $pending['notification_date']; $notification_date = explode(" ", $tmp_date); $notification_date = $notification_date[0]; @endphp
Nombre postulante {{$applicant['firstname']}} {{$applicant['lastname']}}
Correo electronico {{$applicant['email']}}
Fecha de notificacion {{ $notification_date }}
Comentario {{ $pending['feedback'] }}
Ver en CRM
@endforeach @else

No hay pendientes DEBUG

@endif