original_string: public function getPermissionsViaRoles(): Collection
      {
          return $this->load('roles', 'roles.permissions')
              ->roles->flatMap(function ($role) {
                  return $role->permissions;
              })->sort()->values();
      }
code: public function getPermissionsViaRoles(): Collection
      {
          return $this->load('roles', 'roles.permissions')
              ->roles->flatMap(function ($role) {
                  return $role->permissions;
              })->sort()->values();
      }
code_tokens: public function getPermissionsViaRoles ( ) : Collection { return $ this -> load ( 'roles' , 'roles.permissions' ) -> roles -> flatMap ( function ( $ role ) { return $ role -> permissions ; } ) -> sort ( ) -> values ( ) ; }
docstring: Return all the permissions the model has via roles.
docstring_tokens: Return all the permissions the model has via roles .