sertxudeveloper/laravel-sitemap

Create programmatically a sitemap for your Laravel website

v1.5.0 2023-04-18 06:39 UTC

This package is auto-updated.

Last update: 2024-03-11 21:05:28 UTC


README

Warning

This package is no longer actively maintained, feel free to create a fork if you need it.
The project requiring this package has been discontinued.

Laravel Sitemap by Sertxu Developer

Laravel Sitemap

Generate a sitemap of your Laravel app.

Requirements

  • PHP >= 7.4
  • Laravel >= 8.x

Installation

You can install this package using Composer.

composer require sertxudeveloper/laravel-sitemap

Generate the sitemap

First you need to initialize the sitemap.

$sitemap = Sitemap::create();

Add Routes

Next you should add the routes to the sitemap.

$sitemap->add(Url::create(route("main.index")));

Save the sitemap

After adding all the routes you want in the sitemap, you should save it in a file.

$sitemap->writeToFile(public_path('sitemap.xml'))

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.



Copyright © 2022 Sertxu Developer