public function all(string $identifier = ''): array
    {
        // Check whether the menu identifier exists.
        if ($identifier && ! $this->exists($identifier)) {
            return [];
        }

        return $identifier ? $this->menus[$identifier] : $this->menus;
    }