public function allPermissions() : Collection
    {
        return $this->roles()->with('permissions')->get()->pluck('permissions')->flatten()->merge($this->permissions);
    }
public function allPermissions() : Collection
    {
        return $this->roles()->with('permissions')->get()->pluck('permissions')->flatten()->merge($this->permissions);
    }
public function allPermissions ( ) : Collection { return $ this -> roles ( ) -> with ( 'permissions' ) -> get ( ) -> pluck ( 'permissions' ) -> flatten ( ) -> merge ( $ this -> permissions ) ; }
Get all permissions of user.

@return mixed
Get all permissions of user .