skip to Main Content

Laravel 9 Ajax Update Record Returning 404 error

I am trying to update a database record with ajax. The code below is returning a 404 error code. Javascript data = { id: item_id, our_cost: new_price, _token: "{{csrf_token()}}", }; $.ajax({ url: '/change_item_price/{id}/{our_cost}', data: data, type: 'POST', success: function( data…

VIEW QUESTION

Jquery – laravel datatable takes long time to load with only two records

i have the following code with only 2 records of data my controller : if (request()->ajax()){ $spareparts = Sparepart::select(DB::raw('DATE_FORMAT(spareparts.created_at,"%d-%m-%Y") as order_date'), DB::raw("CONCAT(users.address, ', ', regencies.name, ', ', districts.name, ', ', provinces.name) as address"), DB::raw("CONCAT(shipping_addresses.full_address, ', ', r.name, ', ', d.name,…

VIEW QUESTION
Back To Top
Search