/**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $menu = Menu::where('tipe', Sentry::getUser()->last_name)->get();
     $school = School::findOrFail($id);
     $validator = Validator::make($data = Input::all(), School::$rules);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput();
     }
     $school->update($data);
     return Redirect::route('user.profile.index')->with("successMessage", "Data Sekolah Berhasil di Update")->withTitle('Profile');
 }
 public function update($id)
 {
     $school = School::findOrFail($id);
     $school->name = Input::get('name');
     $school->address = Input::get('address');
     $school->contact = Input::get('contact');
     $school->contact_person = Input::get('contact_person');
     $school->level = Input::get('level');
     $school->save();
     Session::flash('message', 'Sukses mengupdate Sekolah!');
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     //
     $school = School::findOrFail($id);
     return view('layouts.schoolprofile', ['school' => $school]);
 }
 /**
  * Update the specified school in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $school = School::findOrFail($id);
     $validator = Validator::make($data = Input::all(), School::$rules);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput();
     }
     $school->update($data);
     return Redirect::route('schools.index');
 }