public function update($id) { $partner = Partner::find($id); $partner->location_id = Auth::user()->location_id; $partner->name = Input::get('name'); $partner->address = Input::get('address'); $partner->contact = Input::get('contact'); $partner->email = Input::get('email'); $partner->save(); Session::flash('message', 'Berhasil mengupdate Info Mitra!'); }
/** * Deleted checked partners. */ public function index_onDelete() { if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) { foreach ($checkedIds as $partnerId) { if (!($partner = Partner::find($partnerId))) { continue; } $partner->delete(); } Flash::success(Lang::get('abnmt.theaterpartners::lang.partners.delete_selected_success')); } else { Flash::error(Lang::get('abnmt.theaterpartners::lang.partners.delete_selected_empty')); } return $this->listRefresh(); }