Exemplo n.º 1
0
 /**
  * [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;
     }
 }
Exemplo n.º 2
0
 /**
  * [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 . ' ลบทิ้งสำเร็จ');
 }