fix settings edit not working

This commit is contained in:
Chris
2018-10-15 14:35:14 +01:00
parent 10b70d4a09
commit aceed3d13b
4 changed files with 12 additions and 4 deletions

View File

@@ -88,8 +88,12 @@ class Setting extends Model
public function getEditValueAttribute()
{
$user = $this->user();
$this->value = $this->users()->where('id', $user->id)->first()->pivot->value;
if((bool)$this->system === true) {
$value = self::_fetch($this->key);
} else {
$value = self::fetch($this->key);
}
$this->value = $value;
switch($this->type) {
case 'image':
$value = '';