Skip to content
PHP Ecosystem
Explore

HasRel

API reference › HTML Attribute › HasRel

traitUIAwesome\Html\Attribute\HasRel
Sourcesrc/HasRel.php
Used by 3 types

Provides an immutable API for the rel attribute.

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel.

MethodDescriptionDefined by
rel()Sets the rel attribute.HasRel
public function rel(string|Stringable|UnitEnum|null $value): static

Sets the rel attribute.

Defines the relationship between the current document and the linked resource.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullLink type token, or null to remove the attribute.

Returns

static: New instance with the updated rel attribute. Rel for predefined enum values.

Throws