Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Fix 404 url by adding Request getBasePath #434

Merged
merged 4 commits into from
Aug 13, 2020

Conversation

erlangparasu
Copy link
Contributor

@erlangparasu erlangparasu commented Aug 1, 2020

Closes #358, #351

@erlangparasu
Copy link
Contributor Author

erlangparasu commented Aug 1, 2020

Make it works with custom base url ( in file .env ) like :
APP_URL=http://localhost/projects/php7.2/my-laravel-app-001/public

without getBasePath(), generated url will look like:
http://localhost/laravel-websockets
that produce 404 http error

after adding getBasePath(), generated url will be:
http://localhost/projects/php7.2/my-laravel-app-001/public/laravel-websockets
200

@erlangparasu erlangparasu changed the title getBasePath Fix 404 url by adding Request getBasePath Aug 2, 2020
@erlangparasu erlangparasu mentioned this pull request Aug 2, 2020
@rennokki
Copy link
Collaborator

I honestly think it would better fit the url() helper: https://laravel.com/docs/7.x/helpers#method-url

@rennokki rennokki added the question Further information is requested label Aug 13, 2020
@erlangparasu
Copy link
Contributor Author

@rennokki thank you! looks simpler {{ url('/auth') }} 👍

@rennokki rennokki merged commit 102901f into beyondcode:master Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard fails when project in subdirectory 404s
2 participants