/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $model = new soal(); $soal = $model->findOrFail($id); $data = DB::table('materi')->get(); return view('soal_edit', ['soal' => $soal, 'materi' => $data, 'nama_user' => $this->getUser()]); }