public function __construct($attributes = null) { parent::__construct($attributes); if (is_array($this->settings)) { $this->setAttribute('settings', new Postmaster_NotificationSettingsModel($this->settings)); } }