archtechx / tenancy

Automatic multi-tenancy for Laravel. No code changes needed.
https://tenancyforlaravel.com
MIT License
3.55k stars 425 forks source link

Issue with Laravel Nova Image not compatible with subdomain #1203

Closed ali-irawan closed 5 months ago

ali-irawan commented 5 months ago

Bug description

Using:

When render in Index page the URL shown as URL from central domain instead of tenant domain

Steps to reproduce

I am using SaaS Boilerplate, for multi-tenancy, with subdomain

use case

When using Nova Image Field (upload the image), using this code

            Image::make('Image', 'image_url')
                ->disableDownload()
                ->prunable()
                ->path('/stores')
                ->hideFromDetail(), 

with this expected to be stored in storage (assume filesystems using local)

In the database stored as stores/file1.jpg

Expected behavior

When rendered in the Nova index page, the URL is shown as http://localhost/storage/stores/file1.jpg

Expected as http://tenant1.localhost/storage/stores/file1.jpg

Laravel version

10.7

stancl/tenancy version

3.7

stancl commented 5 months ago

Please use our Discord for support questions. This repo is only for tracking bugs in tenancy itself, not integrations.