public function updatedAt() { return Dates::converTo($this->updated_at)->diffForHumans(); }
/** * Coverts datetime from EU format to DB format * * @param string $datetime (ex. DD/MM/YYYY HH:MM:SS) * * @return string */ public static function convertDatetimeToDbFormat($datetime) { $pieces = explode(' ', $datetime); $time = $pieces[1]; return Dates::convertToDbFormat($pieces[0]) . ' ' . $time; }