src/Traits/LaratrustUserTrait.php
public function allPermissions()
    {
        $roles = $this->roles()->with('permissions')->get();

        $roles = $roles->flatMap(function ($role) {
            return $role->permissions;
        });

        return $this->permissions()->get()->merge($roles)->unique('name');
    }
public function allPermissions()
    {
        $roles = $this->roles()->with('permissions')->get();

        $roles = $roles->flatMap(function ($role) {
            return $role->permissions;
        });

        return $this->permissions()->get()->merge($roles)->unique('name');
    }
public function allPermissions ( ) { $ roles = $ this -> roles ( ) -> with ( 'permissions' ) -> get ( ) ; $ roles = $ roles -> flatMap ( function ( $ role ) { return $ role -> permissions ; } ) ; return $ this -> permissions ( ) -> get ( ) -> merge ( $ roles ) -> unique ( 'name' ) ; }
Return all the user permissions.

@return boolean
Return all the user permissions .