Skip to content

Commit

Permalink
Update IranPaymentTransaction.php
Browse files Browse the repository at this point in the history
date serialization format updated
  • Loading branch information
dena-a committed Apr 4, 2022
1 parent 153aa41 commit e0e557a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Models/IranPaymentTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Dena\IranPayment\Models;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;

use Dena\IranPayment\Traits\IranPaymentDatabase as DatabaseTrait;
Expand Down Expand Up @@ -34,6 +35,17 @@ class IranPaymentTransaction extends Model
const T_PAID_BACK = 5;
const T_CANCELED = 6;

/**
* Prepare a date for array / JSON serialization.
*
* @param \DateTimeInterface $date
* @return string
*/
protected function serializeDate(DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s');
}

/**
* The attributes that are mass assignable.
*
Expand Down

0 comments on commit e0e557a

Please sign in to comment.