module() public method

get the module permissions
Author: Steve Montambeault
public module ( ) : array
return array
コード例 #1
0
ファイル: GroupsController.php プロジェクト: stevemo/cpanel
 /**
  * Show the form for editing the specified resource.
  *
  * @author Steve Montambeault
  * @link   http://stevemo.ca
  *
  * @param $id
  *
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
  */
 public function edit($id)
 {
     try {
         $group = $this->groups->findById($id);
         $groupPermissions = $group->getPermissions();
         $genericPermissions = $this->permissions->generic();
         $modulePermissions = $this->permissions->module();
         return View::make(Config::get('cpanel::views.groups_edit'))->with('group', $group)->with('genericPermissions', $genericPermissions)->with('modulePermissions', $modulePermissions)->with('groupPermissions', $groupPermissions);
     } catch (GroupNotFoundException $e) {
         return Redirect::route('admin.groups.index')->with('error', $e->getMessage());
     }
 }
コード例 #2
0
 /**
  * Display the user permissins
  *
  * @author Steve Montambeault
  * @link   http://stevemo.ca
  *
  * @param  int $userId
  * @return Response
  */
 public function index($userId)
 {
     try {
         $user = $this->users->findById($userId);
         $userPermissions = $user->getPermissions();
         $genericPermissions = $this->permissions->generic();
         $modulePermissions = $this->permissions->module();
         return View::make(Config::get('cpanel::views.users_permission'))->with('user', $user)->with('userPermissions', $userPermissions)->with('genericPermissions', $genericPermissions)->with('modulePermissions', $modulePermissions);
     } catch (UserNotFoundException $e) {
         return Redirect::route('cpanel.users.index')->with('error', $e->getMessage());
     }
 }