mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 05:14:46 +02:00
21 lines
416 B
PHP
21 lines
416 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Models\Traits;
|
|
|
|
/**
|
|
* @mixin \Illuminate\Database\Eloquent\Model
|
|
*/
|
|
trait WithImmutableDates
|
|
{
|
|
/**
|
|
* Converts the mutable Carbon instance into an immutable Carbon instance.
|
|
*
|
|
* @param mixed $value
|
|
* @return \Carbon\CarbonImmutable
|
|
*/
|
|
protected function asImmutableDateTime($value)
|
|
{
|
|
return $this->asDateTime($value)->toImmutable();
|
|
}
|
|
}
|