Can't create resources - POST `/livewire/update` 404s only when logged in
Hey, I've been using Laravel for years but brand new to Filament & Livewire. I'm hoping to replace Nova.
I'm having trouble creating my first resource. The resource and form etc seem fine. I can confirm POST
/livewire/update
exists with a artisan route:list
and checking that it returns a 200 from the login page. However I get a 404 when accessing it after logging in to filament and trying to create a resource.
I can see in the Livewire source code (https://github.com/livewire/livewire/blob/b008a9ecd324e1559ce10f6cd6a359c7f0927e4b/src/Mechanisms/HandleRequests/HandleRequests.php#L20-L22) that it applies the web
middleware group by default. I've checked my web
middleware group and it's the same as in the Laravel 10.x scaffold so I haven't modified it. My global middleware also hasn't been changed from the scaffold.
I tried setting the update url with Livewire::setUpdateRoute()
but then I can't log in - I guess due to no longer verifying CSRF tokens or something.
This is most likely a me or Livewire issue so I can seek Livewire support if more appropriate but any help pointing where to debug this would be greatly appreciated.GitHub
livewire/src/Mechanisms/HandleRequests/HandleRequests.php at b008a9...
A full-stack framework for Laravel that takes the pain out of building dynamic UIs. - livewire/livewire
1 Reply
Figure it out - it's my own fault. I had a
creating()
model hook which dispatched something in a queue which was running synchronously in dev and threw a 404 which caused the 404 response from livewire/update