Fix EV company logo upload to use public disk

Logos were being written to the default filesystem disk, which
resolves to storage/app/private and isn't web-servable, so the
frontend couldn't load the image. Store logos on the public disk
(storage/app/public, symlinked to public/storage) instead, and
resolve logoUrl() against that disk explicitly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HaT8a5ZWh45JkjTLPWeaP
This commit is contained in:
Nyan Lin Paing
2026-09-03 00:30:50 +07:00
parent 31ed52500a
commit d1ce73e7ff
3 changed files with 9 additions and 6 deletions
@@ -26,7 +26,7 @@ test('returns the company logo as a full absolute url', function () {
$this->withHeader('Authorization', "Bearer {$this->token}")
->getJson('/api/v1/companies')
->assertSuccessful()
->assertJsonFragment(['logo' => url(Storage::disk(config('filesystems.default'))->url($company->logo))]);
->assertJsonFragment(['logo' => url(Storage::disk('public')->url($company->logo))]);
});
test('returns a null logo when the company has none', function () {