attributes['credentials']; if (!empty($credentials)) { $credentials = json_decode($credentials, true); } return $credentials; } public function getCurrenciesAttribute() { if (!empty($this->attributes['currencies'])) { return json_decode($this->attributes['currencies'], true); } return []; } }