skip to Main Content

Why is PUT method not allowed in Laravel?

Controller public function edit(Product $product) { return view('products_update', compact('product')); } public function edit(Product $product) { return view('products_update', compact('product')); } public function update(Request $request, $id) { $validatedData = $request->validate([ 'name' => 'required', 'desc' => 'required', 'price' => 'required|numeric', 'qty' => 'required',…

VIEW QUESTION

Why is jquery post sending empty data?

<!DOCTYPE html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <head> </head> <body> <div id="all-comments"></div> <input type="hidden" name="page_id" value="1"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function() { let page_id = $('input[name="page_id"]').val(); $.ajax({ url: 'vender/show_comment.php', type: 'POST', data: { page_id: page_id } }); setTimeout(function() { $("#all-comments").load("vender/show_comment.php") },…

VIEW QUESTION
Back To Top
Search