Example #1
0
 public function getGroupsFree()
 {
     try {
         $dataCampania = Groups::whereCustomerId(0)->lists('name', 'id');
         $return = array('state' => 1, 'msg' => 'ok', 'data' => $dataCampania);
     } catch (Exception $exc) {
         $return = array('state' => 0, 'msg' => $exc->getMessage());
     }
     return response()->json($return);
 }
Example #2
0
 public function getGroups($id = null)
 {
     $table = new Groups();
     if (!empty($id)) {
         $table = Groups::whereCustomerId($id);
     }
     return viewc('client.' . self::NAMEC . '.groups', compact('table', 'id'));
 }