skip to Main Content

Laravel – The POST method is not supported for route admin/bill. Supported methods: GET, HEAD

In Laravel i use ajax for adding and fetching data from MySQL Database through blade template, i have add form summation on onsubmit event. Please Help me. My codes are. Route.php Route::get('admin/bill',[BillingController::class, 'bill'])->name('billing'); Route::post('admin/billing/add',[BillingController::class, 'billadd'])->name('admin.bill.add'); Controller.php public function billadd(Request $request){…

VIEW QUESTION

Javascript – fetch post redirecting to api response body

I have the following code: const form = document.querySelector('form'); form.addEventListener('submit', handleSubmit()); async function handleSubmit(event) { const url = new URL(form.action); const formData = new FormData(form); @type {Parameters<fetch>[1]} const fetchOptions = { method: form.method, body: formData, }; const response = await…

VIEW QUESTION
Back To Top
Search