Illuminate\Database\Eloquent\Model::freshTimestampString PHP Method

freshTimestampString() public method

Get a fresh timestamp for the model.
public freshTimestampString ( ) : string
return string
    public function freshTimestampString()
    {
        return $this->fromDateTime($this->freshTimestamp());
    }

Usage Example

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());
 }
All Usage Examples Of Illuminate\Database\Eloquent\Model::freshTimestampString
Model