protected function getPath(): string
    {
        $directory = config('menus.directory');

        if (! $directory) {
            throw new DirectoryNotFound('Directory with menu files does not exist.');
        }

        $path = $this->file->exists(base_path($directory)) ? base_path($directory) : __DIR__ . '/../resources/menus';

        return $path;
    }