public function delete($id) { if (Auth::check()) { $data = Guru::find($id); $data->delete(); return \Redirect::to('guru'); } else { return \Redirect::to('login'); } }
public function kelasaddform() { if (Auth::check()) { $students = Siswa::all(); $kelas = Kelas::all(); $thnajar = TahunAjar::all(); $guru = Guru::where("jabatan", "=", "Wali Kelas")->get(); return \View::make('Addons.Siswa.kelasaddform')->with('students', $students)->with('kelas', $kelas)->with('thnajar', $thnajar)->with('guru', $guru); } else { return \Redirect::to('login'); } }