Пример #1
0
 /**
  * [queryFrmAction show form query data by use ajax]
  * @return [type] [description]
  */
 public function queryFrmAction()
 {
     //$rs_data = QueryData::getDataType();//Get datatype only its exist in raw data
     // $user_id =  Auth::getUser()->id;
     // $role_obj = new RoleUser();
     // $role_id = $role_obj->getRoleById($user_id);
     // $role_policy_ojb = new RolePolicy();
     // $policy_id = $role_policy_ojb->getPolicyByRoleId($role_id->role_id);
     // var_dump($this->policy_id);exit;
     $data_privacy_obj = new DataPrivacy();
     $rs_data_privacy = $data_privacy_obj->getDataByPolicyId($this->policy_id);
     // var_dump($role_id->role_id);
     // var_dump($policy_id);
     // var_dump($rs_data_privacy);
     //exit;
     // $arr_dataid = DataPrivacy::getData();// Get datatype all privacy data is on and relate with policy assigned
     // $rs_data = Data::getDataInfo($arr_dataid);
     $all_agency = Agency::all();
     $relate_policy = Policy::getPolicyByUserId();
     //$relate_condition = QueryData::getCondtionType();
     $query_obj = new QueryData();
     $relate_condition = $query_obj->getCondtionTypeV2($this->policy_id);
     // var_dump($relate_condition);exit;
     return View::make('querydata.data')->with('all_data', $rs_data_privacy)->with('all_agency', $all_agency)->with('relate_policy', $relate_policy)->with('relate_condition', $relate_condition);
 }
Пример #2
0
 public function run()
 {
     $faker = Faker::create();
     $accType = Accounts::all()->lists('accountTypeId');
     $agency = Agency::all()->lists('agencyId');
     foreach (range(1, 20) as $index) {
         $atype = $faker->randomElement($accType);
         Log::info($atype);
         if ($atype == 3) {
             $agen = $faker->randomElement($agency);
             User::create(array('username' => str_replace('.', '_', $faker->unique()->username), 'password' => Hash::make('admin'), 'email' => $faker->email, 'accountType' => $atype, 'updated_at' => new DateTime(), 'created_at' => new DateTime(), 'agencyId' => $agen));
         } else {
             User::create(array('username' => str_replace('.', '_', $faker->unique()->username), 'password' => Hash::make('admin'), 'email' => $faker->email, 'accountType' => $atype, 'updated_at' => new DateTime(), 'created_at' => new DateTime()));
         }
     }
 }
Пример #3
0
 /**
  * [peerAgencyFrm description]
  * @return [type] [description]
  */
 public function peerAgencyFrm()
 {
     $agency = Agency::all();
     return View::make('peer.agencylist')->with('all_agency', $agency);
 }
Пример #4
0
 /**
  * [userSecurityFrm description]
  * @param  [type] $id [description]
  * @return [type]     [description]
  */
 public function userSecurityFrm($id)
 {
     $agency = Agency::all();
     $nhcuser = new Usernhc();
     $datas = $nhcuser->getUsernhcById($id);
     return View::make('userlist.security')->with('agency', $agency)->with('userinfo', $datas[0]);
 }
Пример #5
0
 /**
  * [queryFrmAction show form query data by use ajax]
  * @return [type] [description]
  */
 public function reqFrmAction()
 {
     return View::make('requestdata.data')->with('all_data', QueryData::getDataType())->with('all_agency', Agency::all())->with('relate_policy', Policy::getPolicyByUserId())->with('relate_condition', QueryData::getCondtionType());
 }
Пример #6
0
 public function registerFrmAction()
 {
     $agency = Agency::all();
     return View::make('register')->with('agency', $agency);
 }
Пример #7
0
 public function listAgencies()
 {
     $data = Agency::all(['agencyName', 'agencyID']);
     return Response::json($data->toArray())->setCallback(Input::get('callback'));
 }
Пример #8
0
 public function listing()
 {
     $agency = Agency::all();
     return $agency->toJson();
 }