Ap3twe
261
7
Laravel

Getting the value of date (Y:M:D)?

Posted 3 months ago by Ap3twe

I wanna get only Y:M:D. In laravel the created_at returns Y,M,D, hour, minutes and second. I tried to use public function getFromDateAttribute($value) { return \Carbon\Carbon::parse($value)->format('d-m-Y'); } in the user model. It still returns 2019-05-15 20:38:42

Please sign in or create an account to participate in this conversation.