use Carbon
or
I usually setup quick helper functions like so:
function humanDate($string)
{
// returns string into 01 Dec 2000 for example
return date('m M Y', strtotime($string));
}
or
function sqlFormat($string)
{
return Carbon::createFromFormat('Y-m-d H:i:s', $string)->timestamp;
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community