diff --git a/app/Http/Controllers/Dashboard/SettingController.php b/app/Http/Controllers/Dashboard/SettingController.php index 52d6629..1fb1db0 100644 --- a/app/Http/Controllers/Dashboard/SettingController.php +++ b/app/Http/Controllers/Dashboard/SettingController.php @@ -49,7 +49,7 @@ public function removeLogo(): RedirectResponse $settings = Setting::query()->firstOrFail(); if ($settings->logo) { - Storage::disk("public")->delete($settings->logo); + $res = Storage::disk("public")->delete($settings->logo); $settings->logo = null; $settings->save(); diff --git a/resources/js/Pages/Dashboard/Setting/Edit.vue b/resources/js/Pages/Dashboard/Setting/Edit.vue index 4cd6919..bcde5c2 100644 --- a/resources/js/Pages/Dashboard/Setting/Edit.vue +++ b/resources/js/Pages/Dashboard/Setting/Edit.vue @@ -9,9 +9,9 @@ import { useForm } from '@inertiajs/inertia-vue3' import FormError from '@/Shared/Forms/FormError.vue' import ManagementHeader from '@/Shared/Components/ManagementHeader.vue' import ManagementHeaderItem from '@/Shared/Components/ManagementHeaderItem.vue' -import ColorInput from "../../../Shared/Forms/ColorInput.vue"; -import {ref} from "vue"; -import {Method} from "@inertiajs/inertia"; +import ColorInput from '../../../Shared/Forms/ColorInput.vue' +import { ref } from 'vue' +import { Method } from '@inertiajs/inertia' const props = defineProps({ settings: Object, @@ -39,11 +39,6 @@ function onFileSelected(event) { imageUrl.value = URL.createObjectURL(event.target?.files[0]) form.errors.logo = '' } - -function deleteFile() { - form.logo = '' - imageUrl.value = '' -}