Replace checkins list with partial in email template

This commit is contained in:
Ben Goldsworthy 2022-11-28 13:49:14 -06:00
parent 8dc74febcf
commit 33f9a8584d
3 changed files with 6 additions and 22 deletions

View file

@ -33,7 +33,7 @@ class Digest extends Mailable
*
* @var string
*/
public $checkins;
public $checkinsList;
/**
* Create a new message instance.
@ -72,8 +72,8 @@ class Digest extends Mailable
}
);
$this->checkins = array_filter(
$trip->checkins,
$this->checkinsList = array_filter(
$trip->checkinsList,
function($elem) use ($cutoffDateTime) {
$elemDateTime = new DateTime($elem->created_at);
return $elemDateTime > $cutoffDateTime;