restore composer.json, add mysqli extension
This commit is contained in:
34
app/Models/Billing.php
Executable file
34
app/Models/Billing.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\LogOptionsTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
|
||||
class Billing extends Model
|
||||
{
|
||||
use LogsActivity, LogOptionsTrait;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $casts = [
|
||||
'order_id' => 'integer',
|
||||
'amount' => 'integer',
|
||||
'transaction_id' => 'string'
|
||||
];
|
||||
|
||||
protected static $logName = 'billings';
|
||||
protected static $recordEvents = ['deleted', 'updated'];
|
||||
protected static $logOnlyDirty = true;
|
||||
|
||||
protected static $logAttributes = [
|
||||
'order_id', 'amount', 'transaction_id', 'status', 'payment_system'
|
||||
];
|
||||
protected static $submitEmptyLogs = false;
|
||||
|
||||
public function order()
|
||||
{
|
||||
return $this->belongsTo(Order::class, 'order_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user