private function _gen_software_detail($id) { $software = SoftwareDetail::where("id_software", $id)->get(); $output = []; foreach ($software as $item) { $output[$item->id_detail] = $item->nama_modul; } return $output; }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // try { $software = Software::find($id); $software->delete(); $software_detail = SoftwareDetail::where('id_softare', $id)->delete(); Session::flash("success", "Success Delete Software"); } catch (Exception $e) { print $e->getMessage(); } }