Пример #1
0
 /**
  * Sync the current name wih the sidebar items.
  *
  * @return self
  */
 private function syncCurrentName()
 {
     $this->items->setCurrent($this->currentName);
     return $this;
 }
Пример #2
0
 /**
  * Get the instance as an array.
  *
  * @return array
  */
 public function toArray()
 {
     return ['name' => $this->name, 'title' => $this->title, 'url' => $this->url, 'icon' => $this->icon, 'active' => $this->active, 'roles' => $this->roles, 'permissions' => $this->permissions, 'children' => $this->children->toArray()];
 }