skip to Main Content

Laravel – The GET method is not supported for route produk/index. Supported methods: POST

My error The GET method is not supported for route produk/index. Supported methods: POST. Route::post('/produk/index', [ProdukController::class,'index'])->name('produk.index'); web.php <?php use IlluminateSupportFacadesRoute; use AppHttpControllersLoginController; use AppHttpControllersProdukController; use AppHttpControllersSupplierController; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register…

VIEW QUESTION

Laravel: 'Get' Route not calling method in controller

I have a route as: Route::get('/edit/detail/{modelName}/{rowId}/{persId}',[AddPersInfoController::class,'editPersDetailTabs'])->name('edit_pers_detail'); and I'm calling it from a button in a table as: Edit: This is the actual code on my page. <td><a href="{{ route('edit_pers_detail',['Posting_history', $posting->id, $posting->pers_info_id] ) }}"> <button class="btn btn-icon btn-primary"> <i class="demo-pli-pencil fs-5"></i>…

VIEW QUESTION

Laravel – How To Distinct By Year and GroupBy Category On Same Query?

I want to make a result from query after distinct and groupby This is My Code $results = DB::table('dokumen') ->join('pengadaan', 'dokumen.id_jenis_pengadaan', '=', 'pengadaan.id') ->select( DB::raw('COUNT(nama_paket) AS jml'), DB::raw('jenis_pengadaan as jenis_pengadaan'), DB::raw('tahun as tahun') ) ->groupBy('jenis_pengadaan', 'tahun') ->orderBy('tahun') ->get(); $hasil =…

VIEW QUESTION

How to return back with error/success message in laravel blade view?

The URL that sends the request is: http://localhost:8000/my_details?my_id='.$id My Controller looks like this: public function my_action(Request $request){ $myauth=$request->validate([ 'remarks' => 'required' ]); $full_name = Auth::user()->full_name; $id=$request->input('id'); $user_remarks=$request->input('user_remarks'); $remarks=$myauth['remarks']; $status=$request->input('status'); $newremarks=$user_remarks . ' ' . $full_name . ': ' . $remarks…

VIEW QUESTION

Laravel – The PUT method is not supported for route vendor/product/action/new. Supported methods: POST

I'm going insane. The entire code looks correct, but I'm still getting this error. But somewhere, something must be going wrong. Controller public function new(Request $request){ $request->validate([ 'name' => 'required|max:255|min:10|string', 'price' => 'numeric|max:255|required', 'stock' => 'required|numeric|max:255', 'description' => 'required|string|max:5000|min:10', 'picture'…

VIEW QUESTION
Back To Top
Search