From 6ed5dff1a50f0791f422547fea84c646718cd837 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 12 May 2021 18:41:49 -0500 Subject: [PATCH] Fix the target path to copy the demo logos in the database\seeds\SettingsSeeder.php. Also added the code that copies the demo logos to app\Console\Commands\ResetDemoSettings.php (#9571) --- app/Console/Commands/ResetDemoSettings.php | 2 ++ database/seeds/SettingsSeeder.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/ResetDemoSettings.php b/app/Console/Commands/ResetDemoSettings.php index 89fd5a5acb..6808b125c8 100644 --- a/app/Console/Commands/ResetDemoSettings.php +++ b/app/Console/Commands/ResetDemoSettings.php @@ -81,6 +81,8 @@ class ResetDemoSettings extends Command $user->save(); } + \Storage::disk('local_public')->put('snipe-logo.png', file_get_contents(public_path('img/demo/snipe-logo.png'))); + \Storage::disk('local_public')->put('snipe-logo-lg.png', file_get_contents(public_path('img/demo/snipe-logo-lg.png'))); } diff --git a/database/seeds/SettingsSeeder.php b/database/seeds/SettingsSeeder.php index e4a3b2fb0b..3ad8b8d856 100644 --- a/database/seeds/SettingsSeeder.php +++ b/database/seeds/SettingsSeeder.php @@ -42,8 +42,8 @@ class SettingsSeeder extends Seeder // Copy the logos from the img/demo directory - Storage::disk('public')->put(public_path('uploads/snipe-logo.png'), file_get_contents(public_path('img/demo/snipe-logo.png'))); - Storage::disk('public')->put(public_path('uploads/snipe-logo-lg.png'), file_get_contents(public_path('img/demo/snipe-logo-lg.png'))); + Storage::disk('local_public')->put('snipe-logo.png', file_get_contents(public_path('img/demo/snipe-logo.png'))); + Storage::disk('local_public')->put('snipe-logo-lg.png', file_get_contents(public_path('img/demo/snipe-logo-lg.png'))); } }