Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Latest commit

 

History

History
63 lines (42 loc) · 1.91 KB

README.md

File metadata and controls

63 lines (42 loc) · 1.91 KB

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