Withdraw.php 535 B

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