Laravel ajax 422 Unprocessable Entity even when token is matching

前端 未结 4 1945
青春惊慌失措
青春惊慌失措 2020-12-19 22:14

I\'m getting 422 Unprocessable Entity error even when I\'m submitting my form via Ajax.

My javascript file

$.ajaxSetup({
    headers         


        
4条回答
  •  离开以前
    2020-12-19 23:11

    Whoever is still looking for the answer, if you are using Lumen make sure the Request object is a type of Illuminate\Http\Request and not the default one from Lumen.

    ```function create(Request $request){
    
    

提交回复
热议问题