src/Stevemo/Cpanel/Controllers/UsersPermissionsController.php
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());
        }
    }
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());
        }
    }
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 ( ) ) ; } }
Display the user permissins

@author Steve Montambeault
@link   http://stevemo.ca

@param  int $userId
@return Response
Display the user permissins