src/Routing/RouteRegistration.php
public function field(string $field, string $inverse = null): self
    {
        $this->defaults = array_merge($this->defaults, [
            ResourceRegistrar::PARAM_RELATIONSHIP_NAME => $field,
            ResourceRegistrar::PARAM_RELATIONSHIP_INVERSE_TYPE => $inverse ?: Str::plural($field),
        ]);

        return $this;
    }
public function field(string $field, string $inverse = null): self
    {
        $this->defaults = array_merge($this->defaults, [
            ResourceRegistrar::PARAM_RELATIONSHIP_NAME => $field,
            ResourceRegistrar::PARAM_RELATIONSHIP_INVERSE_TYPE => $inverse ?: Str::plural($field),
        ]);

        return $this;
    }
public function field ( string $ field , string $ inverse = null ) : self { $ this -> defaults = array_merge ( $ this -> defaults , [ ResourceRegistrar :: PARAM_RELATIONSHIP_NAME => $ field , ResourceRegistrar :: PARAM_RELATIONSHIP_INVERSE_TYPE => $ inverse ? : Str :: plural ( $ field ) , ] ) ; return $ this ; }
Set the route's relationship field name and inverse resource type.

@param string $field
@param string|null $inverse
@return $this
Set the route s relationship field name and inverse resource type .