Withdraw.php 468 B

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