当前位置: 首页>>代码示例>>PHP>>正文


PHP Data::all方法代码示例

本文整理汇总了PHP中Data::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::all方法的具体用法?PHP Data::all怎么用?PHP Data::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Data的用法示例。


在下文中一共展示了Data::all方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: indexAction

 public function indexAction()
 {
     $user = User::findOrFail(Auth::user()->id);
     //die(var_dump($user));
     if ($user->name == $this->adminGroup) {
         $records = Data::all();
     } else {
         $records = $user->datas()->get();
     }
     $data = ["records" => $records, "HeaderTitle" => trans('data.index')];
     return View::make($this->routeIndex, $data);
 }
开发者ID:alejandromorg,项目名称:Inventario,代码行数:12,代码来源:DataController.php

示例2: getReport

 public function getReport()
 {
     // $purp = new Purpose();
     // $per_page = Config::get('nhc/site.perpage') ;
     // $purpose = $purp->getAllPurpose($per_page);
     $allDataName = Data::all(array('id', 'data_name'))->toArray();
     foreach ($allDataName as $key => $value) {
         $arr_data[$key]['id'] = 'data_' . $value['id'];
         $arr_data[$key]['name'] = $value['data_name'];
     }
     $allRoleName = Roles::all(array('id', 'role_name'))->toArray();
     foreach ($allRoleName as $key => $value) {
         $arr_role[$key]['id'] = 'role_' . $value['id'];
         $arr_role[$key]['name'] = $value['role_name'];
     }
     $supportData = array_merge($arr_role, $arr_data);
     return View::make('report.report')->with('listbox', $supportData);
     //->with('paginator',$purpose);
 }
开发者ID:nattaphat,项目名称:cuse2,代码行数:19,代码来源:ReportController.php

示例3: listDataFrm

 /**
  * [listDataFrm show form data and select data run by ajax
  * @return [array] [collect of data]
  */
 public function listDataFrm()
 {
     return View::make('rbac.datalist')->with('all_data', Data::all());
 }
开发者ID:nattaphat,项目名称:cuse2,代码行数:8,代码来源:PolicyController.php

示例4: privacyDataSave

 /**
  * [privacyDataSave save method for user privacy
  * @param  [integer] $agency_id [agency id]
  * @param  [integer] $user_id [user id]
  * @return [none]     [redirect to user privacy page]
  */
 public function privacyDataSave($agency_id, $user_id)
 {
     $data = Input::all();
     //var_dump($data);exit;
     //Get all data type
     $data_type = Data::all();
     foreach ($data as $key => $value) {
         if ($key != "_token") {
             list($data_id, $table_info) = explode(":", $key);
             $value == 'on' ? $status = true : ($status = false);
             // echo $status;
             // echo "<br />";
             $priv_data['data_id'] = $data_id;
             $priv_data['agency_id'] = $agency_id;
             $priv_data['status'] = $status;
             $privacy_data[] = $priv_data;
         }
     }
     // var_dump($privacy_data);
     // exit;
     DataPrivacy::where('agency_id', '=', $agency_id)->delete();
     DataPrivacy::insert($privacy_data);
     return Redirect::to('/privacy/' . $user_id)->with('success', 'Your data privacy saved.');
 }
开发者ID:nattaphat,项目名称:cuse2,代码行数:30,代码来源:PrivacyController.php

示例5: peerDataFrm

 /**
  * [peerDataFrm show form peer's data use ajax]
  * @return [type] [description]
  */
 public function peerDataFrm()
 {
     return View::make('peer.datalist')->with('all_data', Data::all());
 }
开发者ID:nattaphat,项目名称:cuse2,代码行数:8,代码来源:PeerController.php

示例6: dataPeerPrivacy

 /**
  * [dataPeerPrivacy return information of agency's privacy]
  * @param  [integer] $agency_id [agency id]
  * @return [type]            [description]
  */
 public function dataPeerPrivacy($agency_id)
 {
     $dataprivacy = new DataPrivacy();
     //$rs index is agency_id
     $rs = $dataprivacy->getDataPrivacy($agency_id);
     // var_dump(Data::all()->toArray());
     // var_dump($rs);exit;
     return View::make('peer.ajax_dataprivacy')->with('agency_dataprivacy', $rs)->with('data_info', Data::all()->toArray());
 }
开发者ID:nattaphat,项目名称:cuse2,代码行数:14,代码来源:QueryDataController.php

示例7: usageAction

 public function usageAction()
 {
     $roleObj = Roles::all();
     $dataObj = Data::all();
     return View::make('usage.usage');
 }
开发者ID:nattaphat,项目名称:cuse2,代码行数:6,代码来源:UsageController.php


注:本文中的Data::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。