Replace checkins list with partial in email template
This commit is contained in:
parent
8dc74febcf
commit
33f9a8584d
3 changed files with 6 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue