/** * [checkObligation description] * @param [type] $oblig [description] * @return [type] [description] */ public function checkObligation($oblig) { $rs = Obligation::where('obl_name', '=', $oblig)->count(); if (isset($rs)) { return $rs >= 1 ? false : true; } }
/** * [delAction description] * @param [type] $id [description] * @return [type] [description] */ public function delAction($id) { Obligation::where('id', '=', $id)->delete(); return Redirect::to('obligation')->with('success', 'ข้อผูกพันรหัส = ' . $id . ' ลบทิ้งสำเร็จ'); }