PHPackages                             hantu/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. hantu/sitemap

ActiveLibrary

hantu/sitemap
=============

Sitemap for Laravel Apps

0.0.13(6y ago)069PHP

Since Apr 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Andrey-Suvorov/test-sitemap)[ Packagist](https://packagist.org/packages/hantu/sitemap)[ RSS](/packages/hantu-sitemap/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

Laravel SiteMap
===============

[](#laravel-sitemap)

It's a test package for Laravel that implements site map functionality.

Installing
----------

[](#installing)

```
composer require hantu/sitemap

```

After updating composer, add the service provider to the providers array in config/app.php

```
Hantu\Sitemap\Providers\SiteMapServiceProvider::class

```

Publish migrations and css-styles:

```
php artisan vendor:publish --tag=sitemap-migrations
php artisan vendor:publish --tag=sitemap-styles

```

Optional Features
-----------------

[](#optional-features)

```
        // prefix to configurate url to sitemap
        'route_prefix' => env('BACKEND_URL', 'backend'),

        // config for route prefix
        'route_as' => 'backend.',

        //driver for sitemap.xml
        'filesystem_driver' => 'public',

        // routes middleware
        'route_middleware' => ['web'],

        /**
         * to use feature your model have to use trait Sitemap
         * or release method getUrls where you return array with prepared URL's for siteMap
         * and add class to this array as in the example below
         */
        'dynamic_url_classes' => [
            \App\Models\Pages::class
        ],

        // Route names for siteMap
        'static_routes' => [

        ],

```

How to use?
-----------

[](#how-to-use)

```
