|
|
@@ -2,9 +2,16 @@
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
+
|
|
|
class Backflow extends BaseModel
|
|
|
{
|
|
|
protected $table = 'backflow';
|
|
|
protected $fillable = ['date', 'member_id', 'recharge_amount', 'withdrawal_amount', 'backflow_ratio', 'amount', 'status'];
|
|
|
- protected $hidden = ['updated_at'];
|
|
|
+
|
|
|
+ function member(): BelongsTo
|
|
|
+ {
|
|
|
+ return $this->belongsTo(User::class, 'member_id', 'member_id')
|
|
|
+ ->select(['member_id','username','first_name']);
|
|
|
+ }
|
|
|
}
|