From 60e58abab58c630574bf7c93a8d35288cffce0f9 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 8 Oct 2019 08:07:43 +1000 Subject: [PATCH] Company Logo upload to groups --- app/Factory/GroupSettingFactory.php | 2 +- app/Utils/Traits/Uploadable.php | 2 ++ tests/Integration/UploadLogoTest.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Factory/GroupSettingFactory.php b/app/Factory/GroupSettingFactory.php index ff5ca7b454f1..faf2d9f59ee8 100644 --- a/app/Factory/GroupSettingFactory.php +++ b/app/Factory/GroupSettingFactory.php @@ -23,7 +23,7 @@ class GroupSettingFactory $gs->name = ''; $gs->company_id = $company_id; $gs->user_id = $user_id; - $gs->settings = json_encode([]); + $gs->settings = new \stdClass; return $gs; diff --git a/app/Utils/Traits/Uploadable.php b/app/Utils/Traits/Uploadable.php index 00e563267c26..d4084b33f216 100644 --- a/app/Utils/Traits/Uploadable.php +++ b/app/Utils/Traits/Uploadable.php @@ -11,6 +11,8 @@ namespace App\Utils\Traits; +use App\Jobs\Util\UploadAvatar; + /** * Class Uploadable diff --git a/tests/Integration/UploadLogoTest.php b/tests/Integration/UploadLogoTest.php index 770150f56840..0a57d50e6dcf 100644 --- a/tests/Integration/UploadLogoTest.php +++ b/tests/Integration/UploadLogoTest.php @@ -61,7 +61,7 @@ class UploadLogoTest extends TestCase $response->assertStatus(200); $acc = $response->json(); - \Log::error($acc); + $logo = $acc['data']['settings']['company_logo_url']; $logo_file = Storage::url($logo);