Withdraw.php 519 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', 'admin_note', 'to_account', 'after_balance', 'address', 'status', 'remark'];
  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. }