Horizon: Static resources URL is using an absolute root reference

Created on 19 Nov 2018  路  6Comments  路  Source: laravel/horizon

How to reproduction:

When requesting example.com/laravel/horizon the page will be blank and css/js resources can't be loaded.

Possible cause:

https://github.com/laravel/horizon/blob/384c84512cdf929886343c2e498f8dc4180d8728/resources/views/app.blade.php#L6-L17
Here's using mix() to generate url for css/js, but without calling asset(mix()) to fix absolute path, these url will be like example.com/vendor/horizon (should be example.com/laravel/vendor/horizon) when laravel's url is using subfolder path like example.com/laravel/horizon.

bug

All 6 comments

Is it related to...
https://github.com/laravel/horizon/pull/355
https://github.com/laravel/horizon/pull/223
https://github.com/laravel/horizon/issues/245
https://github.com/laravel/horizon/pull/379
...I think there are more...

same thing happens with telescope & probably with Nova. There are some alternatives in the linked issues but not a built in feature :(

Is it related to...

355

223

245

379

...I think there are more...

same thing happens with telescope & probably with Nova. There are some alternatives in the linked issues but not a built in feature :(

Related from telescope:
laravel/telescope#414
laravel/telescope#270
laravel/telescope#293
PR:
laravel/telescope#281 rejected
laravel/telescope#272 accepted which fixed static resources url

We could fix this. Feel free to send in a PR to the current release with the asset helper like on telescope.

We could fix this. Feel free to send in a PR to the current release with the asset helper like on telescope.

Telescope seems doesn't want to fix this due to changing vue route root path : laravel/telescope#281 and https://github.com/laravel/telescope/issues/414#issuecomment-440155289

Heya, I'm sorry. Was a little confused there. Seems like this is indeed a no-go sorry.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmitryuk picture dmitryuk  路  3Comments

etiennellipse picture etiennellipse  路  3Comments

crash13override picture crash13override  路  5Comments

Pustiu picture Pustiu  路  5Comments

elynnaie picture elynnaie  路  3Comments