freshTimestampString() public method

Get a fresh timestamp for the model.
public freshTimestampString ( ) : string
return string
Example #1
0
 /**
  * Add the "updated at" column to an array of values.
  *
  * @param  array  $values
  * @return array
  */
 protected function addUpdatedAtColumn(array $values)
 {
     if (!$this->model->usesTimestamps()) {
         return $values;
     }
     $column = $this->model->getUpdatedAtColumn();
     return array_add($values, $column, $this->model->freshTimestampString());
 }
Example #2
0
 /**
  * Soft delete the record in the database.
  *
  * @return int
  */
 protected function softDelete()
 {
     $column = $this->model->getDeletedAtColumn();
     return $this->update(array($column => $this->model->freshTimestampString()));
 }