Precognition Plus Demo Docs GitHub

Limitations and troubleshooting

Limitations

Troubleshooting

A form's first precognitive request should carry Precognition-Rules: true, and its response a rules object.

What you see What to check
No Precognition-Rules header setupPrecognitionPlus() runs before the app starts, and npm ls laravel-precognition lists one copy. Requests that work as plain Precognition never send it.
The header, but no rules The route uses HandlePrecognitiveRequests and a FormRequest, PRECOGNITION_PLUS_ENABLED isn't false, and none of the limitations above turns its rules off. Errors while building them go to your log.
A 403, a redirect or a 500 Only 204 and 422 responses get rules, so fix what Laravel returned first.
A CORS error Add Precognition-Rules to allowed_headers in config/cors.php.
A field always goes to the server See the rules for what always goes to the server.

Report a problem on GitHub, with the FormRequest's rules and the request and response from the Network tab.