From 7a94e28da25de0eb00f4c50d86a4bba9bcddcf07 Mon Sep 17 00:00:00 2001 From: Saeed Vaziry Date: Fri, 20 Jun 2025 00:02:22 +0200 Subject: [PATCH] fix optimizer --- app/Http/Controllers/Auth/AuthenticatedSessionController.php | 2 +- app/Http/Controllers/Auth/ConfirmablePasswordController.php | 2 +- app/Http/Controllers/VitoSettingController.php | 3 +++ docker/start.sh | 1 - resources/js/pages/auth/confirm-password.tsx | 2 +- resources/js/pages/auth/login.tsx | 2 +- scripts/install.sh | 1 - 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Auth/AuthenticatedSessionController.php b/app/Http/Controllers/Auth/AuthenticatedSessionController.php index a73c066f..6a3e2091 100644 --- a/app/Http/Controllers/Auth/AuthenticatedSessionController.php +++ b/app/Http/Controllers/Auth/AuthenticatedSessionController.php @@ -28,7 +28,7 @@ public function create(Request $request): Response ]); } - #[Post('login', name: 'login', middleware: 'guest')] + #[Post('login', name: 'login.store', middleware: 'guest')] public function store(Request $request): RedirectResponse { $this->validate($request, [ diff --git a/app/Http/Controllers/Auth/ConfirmablePasswordController.php b/app/Http/Controllers/Auth/ConfirmablePasswordController.php index 81375f21..7a66822a 100644 --- a/app/Http/Controllers/Auth/ConfirmablePasswordController.php +++ b/app/Http/Controllers/Auth/ConfirmablePasswordController.php @@ -24,7 +24,7 @@ public function show(): Response return Inertia::render('auth/confirm-password'); } - #[Post('/', name: 'password.confirm')] + #[Post('/', name: 'password.confirm.store')] public function store(Request $request): RedirectResponse { if (! Auth::guard('web')->validate([ diff --git a/app/Http/Controllers/VitoSettingController.php b/app/Http/Controllers/VitoSettingController.php index fe4c3d8e..bec5e15b 100644 --- a/app/Http/Controllers/VitoSettingController.php +++ b/app/Http/Controllers/VitoSettingController.php @@ -5,6 +5,7 @@ use Exception; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Storage; use Illuminate\Validation\ValidationException; @@ -121,6 +122,8 @@ public function import(Request $request): RedirectResponse move_directory($extractPath.'/server-logs', storage_path('app/server-logs')); } + Artisan::call('optimize'); + return redirect()->route('vito-settings') ->with('success', 'Settings imported successfully.'); } diff --git a/docker/start.sh b/docker/start.sh index 04f6137f..ea716e46 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -63,7 +63,6 @@ service nginx start php /var/www/html/artisan migrate --force php /var/www/html/artisan optimize:clear php /var/www/html/artisan optimize -php /var/www/html/artisan icons:cache php /var/www/html/artisan user:create "$NAME" "$EMAIL" "$PASSWORD" diff --git a/resources/js/pages/auth/confirm-password.tsx b/resources/js/pages/auth/confirm-password.tsx index cdad51c9..7b549cc4 100644 --- a/resources/js/pages/auth/confirm-password.tsx +++ b/resources/js/pages/auth/confirm-password.tsx @@ -17,7 +17,7 @@ export default function ConfirmPassword() { const submit: FormEventHandler = (e) => { e.preventDefault(); - post(route('password.confirm'), { + post(route('password.confirm.store'), { onFinish: () => reset('password'), }); }; diff --git a/resources/js/pages/auth/login.tsx b/resources/js/pages/auth/login.tsx index d80f606b..0a3b9cb0 100644 --- a/resources/js/pages/auth/login.tsx +++ b/resources/js/pages/auth/login.tsx @@ -30,7 +30,7 @@ export default function Login({ status, canResetPassword }: LoginProps) { const submit: FormEventHandler = (e) => { e.preventDefault(); - post(route('login'), { + post(route('login.store'), { onFinish: () => reset('password'), }); }; diff --git a/scripts/install.sh b/scripts/install.sh index 2fcffb6c..1ae9a9a7 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -206,7 +206,6 @@ php artisan plugins:install https://github.com/vitodeploy/laravel-octane-plugin # optimize php artisan optimize -php artisan icons:cache # start worker supervisorctl start worker:*