diff --git a/app/Http/Controllers/Users/AgencyController.php b/app/Http/Controllers/Users/AgencyController.php index bacdbc3..68eb69e 100644 --- a/app/Http/Controllers/Users/AgencyController.php +++ b/app/Http/Controllers/Users/AgencyController.php @@ -77,10 +77,10 @@ class AgencyController extends Controller 'logo.file_extension' => __('validation.agency.logo.file_extension'), ]); - \File::delete(public_path('assets/imgs/'.Option::get('agency_logo_path'))); + \File::delete(storage_path('app/public/assets/imgs'.Option::get('agency_logo_path'))); $filename = $file['logo']->getClientOriginalName(); - $file['logo']->move(public_path('assets/imgs'), $filename); + $file['logo']->move(storage_path('app/public/assets/imgs'), $filename); Option::set('agency_logo_path', $filename); flash(__('agency.updated'), 'success'); diff --git a/app/helpers.php b/app/helpers.php index cfe933f..81f9fb1 100755 --- a/app/helpers.php +++ b/app/helpers.php @@ -230,8 +230,8 @@ function app_logo_path() $defaultLogoImagePath = 'default-logo.png'; $optionLogoImagePath = Option::get('agency_logo_path'); - if (is_file(public_path('assets/imgs/'.$optionLogoImagePath))) { - return asset('assets/imgs/'.$optionLogoImagePath); + if (is_file(storage_path('app/public/assets/imgs/'.$optionLogoImagePath))) { + return asset('storage/assets/imgs/'.$optionLogoImagePath); } return asset('assets/imgs/'.$defaultLogoImagePath); diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore index d6b7ef3..940f9d2 100755 --- a/storage/app/public/.gitignore +++ b/storage/app/public/.gitignore @@ -1,2 +1,4 @@ * +assets/imgs/* +!assets/imgs !.gitignore