I am following the guide to implement a "published_at" property.
public function getStoryDateAttribute()
{
return date('d-m-Y', strtotime($this->attributes['story_date']));
}
In the blade view I need to extract the different values in each element
I would like to know where I should implement a function that allows me to get just the day, or the month... Directly in the view, or in the controller?.. If it is in the controller how can i access it from the view?
Nope, it gives me error (probably because he's expecting Y-m-d and i give it d-m-Y? ).. anyway I can live leaving that mutator, but what about extracting the month in the 3 letters format ( format 'M' )... is it possible?