24 lines
457 B
PHP
24 lines
457 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
|
||
|
|
class Payment extends Model
|
||
|
|
{
|
||
|
|
use SoftDeletes;
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'subscription_id', 'amount', 'payment_method', 'transaction_id', 'paid_at', 'status', 'memo'
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $dates = [
|
||
|
|
'paid_at',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function subscription() {
|
||
|
|
return $this->belongsTo(Subscription::class);
|
||
|
|
}
|
||
|
|
}
|