Exemplo n.º 1
0
 public function updatedAt()
 {
     return Dates::converTo($this->updated_at)->diffForHumans();
 }
Exemplo n.º 2
0
 /**
  * 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;
 }