<?php
namespace App\Bank;
use App\Imali\Transfer;
use App\User;
use Illuminate\Database\Eloquent\Model;
use DateTimeInterface;
class HistoryPayment extends Model
{
protected $fillable = [
'sender_account',
'sender_name',
'amount_credited',
'status_user',
'status',
'comissao',
'amount',
'sender_id',
'user_id',
'actual_points',
'last_points',
'win_points',
'transaction_id',
'user_id',
'category_id'
];
function user()
{
return $this->belongsTo(User::class);
}
function transaction()
{
return $this->belongsTo(Payment::class);
}
function transferencia()
{
return $this->belongsTo(Transfer::class);
}
protected function serializeDate(DateTimeInterface $date)
{
return $date->format('d-m-Y H:i:s');
}
}