خرید بک لینک

Vote count: 0

I have a datetime property in the model

 public function getStoryDateDayAttribute()
{
    retu date('d-m-Y', strtotime($this->attributes['story_date']));
}

I need to extract just the day like this:

@foreach($events as $event)
            <li>
                <time datetime={!! $event->story_date !!}>
                    <span class="day">4</span>

Which is the best way to achieve this? Do I have to make a method inside the Model or create a Helper string manipulation method?

asked 34 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 4 تير 1395 ساعت: 22:20

صفحه بندی