From 363ef48b5bdcbdd61ccec1c2c85b805a9b8470a8 Mon Sep 17 00:00:00 2001 From: John Trickett <149476912+johntrickett86@users.noreply.github.com> Date: Wed, 8 May 2024 15:54:44 +0100 Subject: [PATCH] Update XeroToken.php Added Eloquent attribute casting in the model to address the TypeError on the php artisan xero:keep-alive command. I have proposed this solution over a migration on the xero-tokens database to minimise the impact of the fix. --- src/Models/XeroToken.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Models/XeroToken.php b/src/Models/XeroToken.php index 01453c0..18c98e9 100755 --- a/src/Models/XeroToken.php +++ b/src/Models/XeroToken.php @@ -31,4 +31,8 @@ protected function expires(): Attribute fn(): DateTimeInterface => $this->updated_at->addSeconds($this->expires_in) ); } + + protected $casts = [ + 'expires_in' => 'integer', + ]; }