all()); return redirect()->back()->with('success', 'Data mapel berhasil ditambahkan.'); } /** * Update the specified resource in storage. */ public function update(Request $request, Mapel $mapel) { $mapel->update($request->all()); return redirect()->back()->with('success', 'Data mapel berhasil diperbarui.'); } /** * Remove the specified resource from storage. */ public function destroy(Mapel $mapel) { $mapel->delete(); return redirect()->back()->with('success', 'Data mapel berhasil dihapus.'); } }