Hi, i have trouble with the beginning with vue.
I need a simple form with title, date and time.
Only these three details are needed. But i need german date format (dd.mm.YYYY).
A possibility is working with unix timestamp. I save this in the database und transform it in the lumen backend and vue frontend. This looks very difficult. Specially with vue.
Or is it better to use the date string in all areas?
You could also just format it in the php side as an accessor and send that along to your vue component and you wouldn't have to worry about formatting it in vue.
In some Model
...
protected $appends = ['some_date_formatted'];
public function getSomeDateFormattedAttribute()
{
return Carbon::parse($this->some_date_field)->format('dd.mm.YYYY');
}
...