spatie/laravel-dashboard

Differences between "php artisan serve" and access via URL

Closed this issue · 3 comments

I've installed the dashboard and an dummy-tile.
If i test it via "php artisan serve" under http://localhost:8000 all looks good.
The POST-Request to http://localhost:8000/livewire/message/dashboard-update-mode would triggered every 60s.

If i used my URL http://dashtest.local lifewire.js would not be found.

If i run "php artisan livewire:publish --assets" to publish the assets, livewire.js would be found but the POST Request for dashboard-update-mode doesn't work and returns an 404 Error.

Any ideas?

Regards Marco

If haven't seen this behaviour myself or got any reports about this.

I'm assuming it has something to to with your local setup.

So, I've checked it again:

  • fresh laravel installtion via composer composer create-project --prefer-dist laravel/laravel cdash
  • install livewire as described in the docs composer require livewire/livewire
  • install dashboard composer require spatie/laravel-dashboard
  • publish dashbord-config and dashboard-migration
  • create a route as described i you docs
  • modified VerifyCsrfToken.php as described in your docs
  • create the view with following content

<x-dashboard> {{-- replace this by any tiles --}} <h2>Hello World</h2> </x-dashboard>

So, with this setup, livewire.js would not be found.
After publishing livewire-config ans livewire-assets, livewire.js would be found, but POST request to dashboard-update-mode runs in an dark Modal with "requested URL not found".

Hi,
dive some deeper, found the Problem. Apache 2.4 has Allowoverride None as default, so changed this to Allowoverride all.

Now it's working, thanks.

Regards Marco