sertxudeveloper / laravel-sitemap
Create programmatically a sitemap for your Laravel website
Fund package maintenance!
sertxudev
buymeacoffee.com/sertxudeveloper
Requires
- php: ^7.4|^8.0
- illuminate/database: ^8.0|^9.0|^10.0
- illuminate/support: ^8.0|^9.0|^10.0
- nesbot/carbon: ^2.0
Requires (Dev)
- nunomaduro/collision: ^6.0
- orchestra/testbench: ^7.5
- phpunit/phpunit: ^9.5
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
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