How to get the data submitted by ajax in Laravel?

1. Function to be achieved: in the menu management page, manipulate the initial ranking of the menu by modifying the values in the sorted column. As shown in the following figure

2.ajax:


3.:


4.

5.dd($data)

Mar.07,2021
The

problem has been solved, and writing the answer is convenient for later beginners to view.
the code printed by 1.dd, you can see that there is data coming through if you take a closer look at it. Echo can display the data directly in the controller.
2. After getting the data, update it directly using the construction querier update, $res = DB:table ('xxx')-> where (' id',$id)-> update (['oid'= > $oid]);

Menu