use native session dates
This commit is contained in:
parent
88a3997bad
commit
ad27a0f03c
2 changed files with 4 additions and 5 deletions
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Auth;
|
||||
|
||||
use App\User\UserRepository;
|
||||
use Carbon\CarbonInterface;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
|
||||
|
|
@ -55,7 +54,7 @@ class EloquentSessionRepository implements SessionRepository
|
|||
SessionModel::where('token', $token)->delete();
|
||||
}
|
||||
|
||||
private function toUtc(CarbonInterface $dateTime): DateTimeImmutable
|
||||
private function toUtc(DateTimeImmutable $dateTime): DateTimeImmutable
|
||||
{
|
||||
return DateTimeImmutable::createFromInterface($dateTime)
|
||||
->setTimezone(new DateTimeZone('UTC'));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace App\Auth;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use DateTimeImmutable;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
|
@ -10,8 +10,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
/**
|
||||
* @property string $token
|
||||
* @property int $user_id
|
||||
* @property CarbonInterface $created_at
|
||||
* @property CarbonInterface $expires_at
|
||||
* @property DateTimeImmutable $created_at
|
||||
* @property DateTimeImmutable $expires_at
|
||||
*
|
||||
* @method static Builder<static>|SessionModel newModelQuery()
|
||||
* @method static Builder<static>|SessionModel newQuery()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue