Skip to content

Commit

Permalink
Fixing error with the theme functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed Jun 16, 2020
1 parent 2874ab3 commit 9416fa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/ThemesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ public function options_save(Request $request, $theme_folder){

$value = $this->getContentBasedOnType($request, 'themes', $row);

$option = ThemeOptions::where('voyager_theme_id', '=', $theme->id)->where('key', '=', $key)->first();
$option = ThemeOptions::where('theme_id', '=', $theme->id)->where('key', '=', $key)->first();


// If we already have this key with the Theme ID we can update the value
if(isset($option->id)){
$option->value = $value;
$option->save();
} else {
ThemeOptions::create(['voyager_theme_id' => $theme->id, 'key' => $key, 'value' => $value]);
ThemeOptions::create(['theme_id' => $theme->id, 'key' => $key, 'value' => $value]);
}
}
}
Expand Down

0 comments on commit 9416fa4

Please sign in to comment.