src/Eloquent/Model.php
final protected function mutateDateTimeAttribute($date, $attribute)
	{
		if (is_numeric($date)) {
			return $this->attributes[$attribute] = Carbon::createFromTimestamp($date);
		}

		return $this->attributes[$attribute] = Carbon::parse($date)->toDateTimeString();
	}
final protected function mutateDateTimeAttribute($date, $attribute)
	{
		if (is_numeric($date)) {
			return $this->attributes[$attribute] = Carbon::createFromTimestamp($date);
		}

		return $this->attributes[$attribute] = Carbon::parse($date)->toDateTimeString();
	}
final protected function mutateDateTimeAttribute ( $ date , $ attribute ) { if ( is_numeric ( $ date ) ) { return $ this -> attributes [ $ attribute ] = Carbon :: createFromTimestamp ( $ date ) ; } return $ this -> attributes [ $ attribute ] = Carbon :: parse ( $ date ) -> toDateTimeString ( ) ; }
Mutator for datetime attributes.

@param        string /int $date
A parsable datetime string or timestamp
@param string $attribute
The name of the attribute we're setting
@return \Carbon\Carbon
Mutator for datetime attributes .