|
|
@@ -1,4 +1,5 @@
|
|
|
<?php
|
|
|
+
|
|
|
namespace App\Models;
|
|
|
|
|
|
class Withdraw extends BaseModel
|
|
|
@@ -6,4 +7,11 @@ class Withdraw extends BaseModel
|
|
|
|
|
|
protected $table = 'withdraws';
|
|
|
protected $fillable = ['member_id', 'amount', 'service_charge', 'to_account', 'after_balance', 'address', 'status', 'remark'];
|
|
|
+
|
|
|
+
|
|
|
+ public function member(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
+ {
|
|
|
+ return $this->belongsTo(User::class, 'member_id', 'member_id')
|
|
|
+ ->select(['id', 'member_id', 'username', 'first_name']);
|
|
|
+ }
|
|
|
}
|