public function all() { if ($this->elegantModel->hasExtension('translatable')) { return parent::all(); } else { return $this->model->all(); } }
/** * Return all settings, with the setting name as key * @return array */ public function all() { $rawSettings = parent::all(); $settings = []; foreach ($rawSettings as $setting) { $settings[$setting->name] = $setting; } return $settings; }