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

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

artjoker/sitemap
================

Sitemap for Laravel Apps

1.0.0(6y ago)01.8kPHP

Since Aug 5Pushed 6y ago2 watchersCompare

[ Source](https://github.com/artjoker/sitemap)[ Packagist](https://packagist.org/packages/artjoker/sitemap)[ RSS](/packages/artjoker-sitemap/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

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

[](#laravel-sitemap)

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

Installing
----------

[](#installing)

```
composer require artjoker/sitemap

```

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

```
Artjoker\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
         */
        'dynamic_url_classes' => [

        ],

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

        ],

        /**
         * enable multi-language urls
         */
        'enable_locales' => false,

        /**
         * Hide default locale in url from app.locale config
         */
        'hide_default_locale' => false,

        /**
         * locales to multi-language urls
         */
        'locales' => [
            'en',
        ],

        /**
         * how many pages will be in one file
         */
        'sitemap_count' => 40000,

        /**
         * Command to generate SiteMap
         */
        'sitemap_generate_command' => 'sitemap:generate',

        /**
         * Jobs priority
         */
        'jobs_priority' => 'default',

```

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

[](#how-to-use)

```
