sertxudeveloper / laravel-sitemap

Create programmatically a sitemap for your Laravel website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Create programmatically a sitemap for your Laravel website

License:MIT License


Languages

Language:PHP 85.6%Language:Blade 14.4%