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
Fix: front-end not working when Laravel is installed in a subdirectory #281
Conversation
Don't run Laravel in a sub-directory. |
I hope you reconsider this if more people in the future come with this problem. |
@taylorotwell @themsaid But most peoples use laravel in sub directorty until they release it in product environment. i hope it will fix in next update. |
@amitm13 maybe use a view composer since its using a variable.
|
@joshuand1990 That did the trick, thank you. |
@joshuand1990 @grey-dev-0 can you please tell me in little detail, i am new to laravel. |
@itsmekps In your AppServiceProvider class add the lines in @joshuand1990 's comment to the boot method. |
“Most people” use sub domains not sub directories for staging |
@dillingham using subdomains is the right way but, it's not doable for everyone, as for some people they might not be able to access their domain settings to create a subdomain so, they do their testing in a subdirectory instead. |
@grey-dev-0 well it not working in sub directories is a good reason to tell your upper management :) if they setup a domain for your production they can setup a simple sub domain so you can do it, as you put it, “the right way” :) |
I have the same problem. I need to see telescope from a subfolder. The rules of Nginx works well for Laravel, but telescope isn't works. |
This worked for me. Thank you! |
|
After my pull request #272 I found out that the routes in vue-route were also pointing at /telescope (in the root directory), so anytime I clicked on something, it just showed me a 404 error. I fixed this again after hours of experimenting, and after testing, it works when:
I can finally use it in peace.
Hope this is useful.