I have a Model Review
that has a unix timestamp as 1 of it's attributes (table columns).
I use 2 accessors inside this model:
public function getReviewDateAttribute($value)
{
return strftime('%A %e %B %Y', $value);
}
public function getReviewDateIsoAttribute()
{
return Carbon::createFromTimestamp($this->review_date)->toDateTimeString();
}
getReviewDateAttribute
works as expected and shows up in the collection of models when I write a query.
However getReviewDateIsoAttribute
does not. What could be the reason for this?
A subquestion: If I use the same attribute in both functions, how can I use the original format as input value?