當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Groups::all方法代碼示例

本文整理匯總了PHP中Groups::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Groups::all方法的具體用法?PHP Groups::all怎麽用?PHP Groups::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Groups的用法示例。


在下文中一共展示了Groups::all方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getSecurity

 public function getSecurity()
 {
     $this->data = array('groups' => Groups::all(), 'pageTitle' => 'Login And Security', 'pageNote' => 'Login Configuration and Setting', 'hybrid' => Config::get('hybridauth'), 'groups' => Groups::all());
     $this->layout->nest('content', 'admin/config/security', $this->data)->with('menus', $this->menus);
 }
開發者ID:buguelos,項目名稱:make,代碼行數:5,代碼來源:ConfigController.php

示例2: postSave

 function postSave($id = 0)
 {
     $rules = array('title' => 'required', 'alias' => 'required|alpha_dash', 'filename' => 'required|alpha', 'status' => 'required');
     $validator = Validator::make(Input::all(), $rules);
     if ($validator->passes()) {
         $content = Input::get('content');
         $data = $this->validatePost('tb_pages');
         if (Input::get('pageID') == 1) {
             $filename = public_path() . "protected/app/views/pages/template/home.blade.php";
         } else {
             $filename = public_path() . "protected/app/views/pages/template/" . Input::get('filename') . ".blade.php";
         }
         $fp = fopen($filename, "w+");
         fwrite($fp, $content);
         fclose($fp);
         $groups = Groups::all();
         $access = array();
         foreach ($groups as $group) {
             $access[$group->group_id] = isset($_POST['group_id'][$group->group_id]) ? '1' : '0';
         }
         $data['access'] = json_encode($access);
         $data['allow_guest'] = Input::get('allow_guest');
         $data['template'] = Input::get('template');
         $this->model->insertRow($data, Input::get('pageID'));
         self::createRouters();
         return Redirect::to('pages')->with('message', SiteHelpers::alert('success', 'Data Has Been Save Successfull'));
     } else {
         return Redirect::to('pages/add/' . $id)->with('message', SiteHelpers::alert('error', 'The following errors occurred'))->withErrors($validator)->withInput();
     }
 }
開發者ID:buguelos,項目名稱:make,代碼行數:30,代碼來源:PagesController.php


注:本文中的Groups::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。