|
|
|
@ -15,4 +15,10 @@ class AgentSetting extends BaseModel |
|
|
|
parent::__construct($attributes); |
|
|
|
$this->timestamps = false; |
|
|
|
} |
|
|
|
|
|
|
|
public function scopeVal($query, $agent_id, $key) |
|
|
|
{ |
|
|
|
$setting = json_decode($query->where('agent_id', $agent_id)->value('setting'), true); |
|
|
|
return $setting[$key] ?? null; |
|
|
|
} |
|
|
|
} |