tenancy / multi-tenant

Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups, previously github.com/hyn/multi-tenant
https://tenancy.dev
MIT License
2.56k stars 394 forks source link

How do i overwrite views? Not getting it right... #1020

Open jackkitley opened 2 years ago

jackkitley commented 2 years ago

Hello

Im copying an inertia view and copying it to a tenant directory under the views folder. It keeps coming up with a error saying the file isnt available locally. Any help would be great.

Ive checked the project source code and this always returns false for isLocal()...

LoadViews.php public function load(WebsiteEvent $event) { if ($this->directory()->isLocal()) {

Screenshot 2022-02-16 at 20 31 05

Screenshot 2022-02-16 at 20 29 27 Screenshot 2022-02-16 at 20 29 10

matthewmnewman commented 2 years ago

I am running into the same issue when updating from Laravel 8 > 9.

It seems it is related to Laravel 9 migrating from 1.x to 3.x of the Flysystem.

I am going to debug this as it seems it is related to anything related to the storage folder (routes,views,media etc).

Update

Looking into this further I can see that the issue is indeed related to the Flystytem package. In verison 3x they removed the ability to retrieve the Prefix getAdapter()->getPathPrefix() so it is unable to locate the storage folder local path. I will have a little tinker when I get some time to try and resolve this.