Fix profit_gold API for gold apps without orders relation eager load.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -91,6 +91,12 @@ class Customer extends Authenticatable implements JWTSubject
|
||||
{
|
||||
return $this->hasMany(Wallet::class ,'owner')->with(['fund','product'])->select(['cash', 'fund_id','product_id','gold', 'owner']);
|
||||
}
|
||||
|
||||
public function orders()
|
||||
{
|
||||
return $this->hasMany(Order::class, 'customer_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class)->select(['id','name']);
|
||||
|
||||
Reference in New Issue
Block a user