This is the documentation for
v1 but the latest version is
v3
.
You can switch versions in the menu on the left/at the top.
Check your current version with the following command:
composer show spatie/menu
- Implements
Spatie\Menu\Activatable
, Spatie\Menu\HasParentAttributes
, Spatie\Menu\Item
/**
* Create an item containing a chunk of raw html.
*
* @param string $html
*
* @return static
*/
public static function raw(string $html)
##getHtml
/**
* @return string
*/
public function getHtml() : string
##render
/**
* @return string
*/
public function render() : string
##isActive
/**
* @return bool
*/
public function isActive() : bool
##setActive
/**
* @return $this
*/
public function setActive()
##setInactive
/**
* @return $this
*/
public function setInactive()
##getParentAttributes
/**
* Return an array of attributes to apply on the parent. This generally means
* the attributes that should be applied on the <li> tag.
*
* @return array
*/
public function getParentAttributes() : array
##setParentAttribute
/**
* @param string $attribute
* @param string $value
*
* @return $this
*/
public function setParentAttribute(string $attribute, string $value = '')
##addParentClass
/**
* @param string $class
*
* @return $this
*/
public function addParentClass(string $class)
- Extends
Spatie\Menu\Html
- Uses
Illuminate\Support\Traits\Macroable