code: public function resource(string $entityName, ?string $name = null, ?string $id = null): ResourceCollection
      {
          $entityName = \rtrim($entityName, '/');
          $name = $name ?: \ltrim($entityName, '/');
          $id = $id ?: $name;
  
          return $this->pushCollection(new ResourceCollection([
              'index' => $this->_index($entityName, $name),
              'create' => $this->_create($entityName, $name),
              'store' => $this->_store($entityName, $name),
              'show' => $this->_show($entityName, $name, $id),
              'edit' => $this->_edit($entityName, $name, $id),
              'update' => $this->_update($entityName, $name, $id),
              'destroy' => $this->_destroy($entityName, $name, $id)
          ]));
      }
docs: entityName -> /users
  
  GET         users.index     /users
  GET         users.create    /users/create
  POST        users.store     /users
  GET         users.show      /users/{id}
  GET         users.edit      /users/{id}/edit
  PUT/PATCH   users.update    /users/{id}/edit
  DELETE      users.destroy   /users/{id}
  
  @param string $entityName
  @param null|string $name
  @param null|string $id
  
  @return ResourceCollection