- session()->flash('success', 'Settings Saved');
- return redirect('/settings');
- }
-
- /**
- * Adapted from http://mekshq.com/how-to-convert-hexadecimal-color-code-to-rgb-or-rgba-using-php/
- * Converts a hex color code in to an RGBA string.
- *
- * @param string $color
- * @param float|boolean $opacity
- * @return boolean|string
- */
- protected function hex2rgba($color, $opacity = false)
- {
- // Return false if no color provided
- if(empty($color)) {
- return false;
+ // Update logo image if set
+ if ($category === 'customization' && $request->hasFile('app_logo')) {
+ $logoFile = $request->file('app_logo');
+ $this->imageRepo->destroyByType('system');
+ $image = $this->imageRepo->saveNew($logoFile, 'system', 0, null, 86);
+ setting()->put('app-logo', $image->url);