Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elixir versioning does not respect subfolders #9760

Closed
kerbylav opened this issue Jul 27, 2015 · 3 comments
Closed

elixir versioning does not respect subfolders #9760

kerbylav opened this issue Jul 27, 2015 · 3 comments

Comments

@kerbylav
Copy link

When laravel app is in subfolder of domain and assets are versioned via elixir's .version() worker then elixir helper doesn't respect subfolder. It just returns plain /build/ path:

https://github.com/laravel/framework/blob/5.1/src/Illuminate/Foundation/helpers.php#L691

@shssoichiro
Copy link

Unfortunately this was already brought up here #8565 and the response was basically that you shouldn't install Laravel in a subdirectory. Sometimes that's not always an option, e.g. my company doesn't want to generate a new subdomain for our staging server for each new app we make, so I'm forced to not use version() in any of my projects.

I also think elixir() should generate a path relative to the app root for consistency with Laravel's other helpers e.g. asset(), but it's not my decision.

@lukasgeiter
Copy link
Contributor

FYI it was changed for Laravel 5.2 to use the asset() helper: #9552
(This can't be changed for 5.1 since it's a breaking change)

For a workaround until then, just add your own elixir() helper function that uses asset()

@jdrda
Copy link

jdrda commented Oct 26, 2015

I have just made a workaround - nest the elixir helper into asset in Blade this way:
{{ asset(elixir('css/style.css')) }}
It works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants