PHPackages                             virtualorz/sitemap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. virtualorz/sitemap

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

virtualorz/sitemap
==================

0.0.4(7y ago)0532PHP

Since Jun 19Pushed 6y agoCompare

[ Source](https://github.com/virtualorz/sitemap)[ Packagist](https://packagist.org/packages/virtualorz/sitemap)[ RSS](/packages/virtualorz-sitemap/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (5)Used By (2)

Usage
=====

[](#usage)

Use Laravel web route to generate sitemap structure, use for parent/child relation and backend left side menu for AdminLte

Install
=======

[](#install)

```
composer require virtualorz/sitemap

```

Config
======

[](#config)

edit config/app.php

```
'providers' => [
    ...
    Virtualorz\Sitemap\SitemapServiceProvider::class
]

'aliases' => [
    ...
    'Sitemap' => Virtualorz\Sitemap\Facades\Sitemap::class,
]

```

Method
======

[](#method)

###### getTreeView

[](#gettreeview)

```
return an Array , the key is parent node name

```

###### getNaviPath($pageName = null)

[](#getnavipathpagename--null)

```
return navipath node array,
if $pageName is null return the current page navi path,
if not return the assign page's navi path

```

###### getParents($pageName = null)

[](#getparentspagename--null)

```
return parent node route item,
if $pageName is nul return the current page parent node,
if not return the assign page's parent node

```

###### getMenu($parmissionArray = null)

[](#getmenuparmissionarray--null)

```
return left side menu structure Array,
if $parmissionArray is null return the full mene
if not return the node in $parmissionArray

```

###### routStruct($parent,$sitemap)

[](#routstructparentsitemap)

```
return an nested Array for root parent i $parent data from $sitemap,
the $sitemap paremeter is result from getTreeVIew method

```

Example for route/web.php
=========================

[](#example-for-routewebphp)

```
Route::get('/customer',
        [
            'as' => 'backend.customer.index' ,// user for id in sitemap
            'uses' => 'backend\CustomerController@index', //controller name
            'parent' => 'backend.index', //parent sitemap id
            'name' => 'Customer List', //customer name for this item
            'label' =>'Data Manage', //backend menu label text for this item
            'fa' => 'fa-database' //backend menu fa icon for this item
        ]);

```

Example for create tree view structure
======================================

[](#example-for-create-tree-view-structure)

```
$sitemap = Sitemap::getTreeView();
$sitemap = Sitemap::routStruct('root',$sitemap);

```

中文版本文件
======

[](#中文版本文件)

[Sitemap : 使用Laravel Route產生網站結構陣列](http://www.alvinchen.club/2019/06/26/%e4%bd%9c%e5%93%81laravel-package-sitemap-%e4%bd%bf%e7%94%a8laravel-route%e7%94%a2%e7%94%9f%e7%b6%b2%e7%ab%99%e7%b5%90%e6%a7%8b%e9%99%a3%e5%88%97/)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

4

Last Release

2561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5a1de7b6118aabaf7e63eea7d43887a49b7c617296007066406b5004364e9c1?d=identicon)[virtualorz](/maintainers/virtualorz)

---

Top Contributors

[![alvin-js](https://avatars.githubusercontent.com/u/59727853?v=4)](https://github.com/alvin-js "alvin-js (4 commits)")

### Embed Badge

![Health badge](/badges/virtualorz-sitemap/health.svg)

```
[![Health](https://phpackages.com/badges/virtualorz-sitemap/health.svg)](https://phpackages.com/packages/virtualorz-sitemap)
```

###  Alternatives

[letournel/path-finder

Path finder algorithm

142.0k](/packages/letournel-path-finder)[wangzd/laravel-dict

laravel-dict是一个用于管理系统常用的配置的简单封装.提高代码的扩展性，可以易读性

103.4k](/packages/wangzd-laravel-dict)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
