code: public function addToMain(array $item, $name = 'default', $first = false)
      {
          // check if the name exists in the main array
          if (!array_key_exists($name, $this->main)) {
              // add it if it doesn't exists
              $this->main[$name] = [];
          }
  
          // check if we are forcing the item to the start
          if ($first) {
              // add the item to the start of the array
              $this->main[$name] = array_merge([$item], $this->main[$name]);
          } else {
              // add the item to the end of the array
              $this->main[$name][] = $item;
          }
  
          return $this;
      }
docs: Add an item to the main navigation array.
  
  @param array  $item
  @param string $name
  @param bool   $first
  
  @return $this