本文整理汇总了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();
}
}