本文整理匯總了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);
}
示例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();
}
}