Illuminate\Database\Eloquent\Model::fromDateTime PHP Méthode

fromDateTime() public méthode

Convert a DateTime to a storable string.
public fromDateTime ( DateTime | integer $value ) : string
$value DateTime | integer
Résultat string
    public function fromDateTime($value)
    {
        $format = $this->getDateFormat();
        $value = $this->asDateTime($value);
        return $value->format($format);
    }

Usage Example

Exemple #1
0
 public function fromDateTime($value)
 {
     return strtotime(parent::fromDateTime($value));
 }
All Usage Examples Of Illuminate\Database\Eloquent\Model::fromDateTime
Model