Dashboard fails when project in subdirectory 404s #358
Description
Installing laravel-websockets in a project that resides in the subdirectory of a fqn, the dashboard xhr request paths are incorrectly formed. It can be hacked to work by overriding dashboard.blade.php
with static path values... less than ideal.
So when we have an installation like this...
www.example.com/mysite/laravel-websockets
line 121 dashboard.blade.php
authEndpoint: '{{ request()->path() }}/auth',
Produces xhr requests 404
I can overcome this by changing line 121 and 165 of dashboard.blade.php to a static path prefix
line 121 - authEndpoint: '/mysite/{{ request()->path() }}/auth',
line 165 - $.getJSON('/mysite/{{ request()->path() }}/api/'+this.app.id+'/statistics', (data) => {
A dynamic solution is required, passing an install path from websockets.php or changing {{ request()->path() }}
to the correct complete path...
I found a post on stack which provides more background...
https://stackoverflow.com/questions/60018500/laravel-websockets-dashboard-base-path-with-sub-folder-not-working