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


PHP link::auth方法代码示例

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


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

示例1: getEdit

 public function getEdit($id)
 {
     Allow::permission($this->module['group'], 'groups');
     if ($id == 1 && !Allow::superuser()) {
         Redirect(link::auth($this->module['rest']));
     }
     $groups = Group::all();
     $group = Group::find($id);
     $mod_actions = Config::get('mod_actions');
     $mod_info = Config::get('mod_info');
     #Helper::dd($mod_actions);
     #Helper::dd($mod_info);
     $group_actions = Action::where('group_id', $group->id)->get();
     #$actions = $group->actions();
     $actions = array();
     foreach ($group_actions as $action) {
         #Helper::d($action->status);
         #continue;
         if ($action->status) {
             $actions[$action->module][$action->action] = $action->status;
         }
     }
     #Helper::dd($actions);
     $group_actions = $actions;
     return View::make($this->module['tpl'] . 'edit', compact('groups', 'group', 'mod_actions', 'mod_info', 'group_actions'));
 }
开发者ID:Grapheme,项目名称:doktornarabote,代码行数:26,代码来源:admin_groups.controller.php

示例2: postStore

 public function postStore()
 {
     Allow::permission($this->module['group'], 'users');
     $json_request = array('status' => FALSE, 'responseText' => '', 'responseErrorText' => '', 'redirect' => FALSE);
     $input = array('name' => Input::get('name'), 'group_id' => (int) Input::get('group'), 'email' => Input::get('email'), 'password' => Hash::make(Input::get('password1')));
     $validation = Validator::make($input, User::$rules);
     if ($validation->passes()) {
         $user = User::create($input);
         #return link::auth('groups');
         $json_request['responseText'] = "Пользователь добавлен";
         #$json_request['responseText'] = print_r(Input::get('actions'), 1);
         $json_request['redirect'] = link::auth('system/' . $this->module['rest'] . '/edit/' . $user->id);
         $json_request['status'] = TRUE;
     } else {
         #return Response::json($v->messages()->toJson(), 400);
         $json_request['responseText'] = 'Неверно заполнены поля';
         $json_request['responseErrorText'] = implode($validation->messages()->all(), '<br />');
     }
     return Response::json($json_request, 200);
 }
开发者ID:Grapheme,项目名称:doktornarabote,代码行数:20,代码来源:admin_users.controller.php


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