Back to JsonapiDocument class

Method addLink

public $this
(mixed $key, mixed $value)
Add a link to the output.
Parameters
  • string $key The name of the link
  • string $value The link
Returns
  • $this
Since
  • 4.0.0

Method addLink - Source code

/**
 * Add a link to the output.
 *
 * @param   string  $key    The name of the link
 * @param   string  $value  The link
 *
 * @return  $this
 *
 * @since  4.0.0
 */
public function addLink($key, $value)
{
    $this->document->addLink($key, $value);
    return $this;
}