Download the PHP package gyvex-com/laravel-macro-sitemap without Composer

On this page you can find all versions of the php package gyvex-com/laravel-macro-sitemap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-macro-sitemap

Latest Version on Packagist Total Downloads Laravel Versions PHP Versions


Laravel Macro Sitemap

Want better Google rankings? Generating a clean and up-to-date sitemap is one of the easiest wins for your website’s SEO. With this package, your sitemap is always synced with your route and content structure, no manual edits needed. Search engines like Google and Bing use your sitemap to crawl your site smarter and faster, which means your new pages and updates show up in search results sooner. Whether you're running a blog, webshop, or custom platform, an automated sitemap gives you an edge in visibility and indexing accuracy.

Lightweight. Extensible. Template-driven.

πŸš€ Features of SEO Laravel Sitemap

πŸ“¦ Installation of the Laravel sitemap package

This package is quick to set up and works out-of-the-box with Laravel 12 and 13. After installing via Composer, you can instantly publish the sitemap route and configuration using a single command. The php artisan sitemap:install command automatically adds a new sitemap.php route file and wires it into your existing web.php, so your sitemap is live without extra setup. It’s the easiest way to boost your SEO visibility with structured sitemap data.

Publish the route & config:


🧭 How to use the sitemap package

This package offers a clean and developer-friendly approach to sitemap generation in Laravel. Whether you're working with static pages or dynamic content from models, adding them to your sitemap is seamless. Use a single macro call for simple routes, or create powerful model-driven templates using the built-in abstract Template class to handle large, dynamic datasets. With just a few lines of code, your entire site structure becomes SEO-friendly and ready for search engine indexing.

βœ… Static routes implemented in sitemap by 1 line in the routes/web.php file

The Route is getting implemented by calling the ->sitemap() Macro.

Available Route Macros

The package includes expressive route macros that make it easy to configure sitemap settings directly in your routes/web.php file.

->sitemap()

Marks the route as sitemap-included.

->changefreq(ChangeFrequency $frequency)

Defines how frequently the content at the URL is likely to change.

->priority(string $priority)

Sets the priority of this URL relative to other URLs on your site.

->lastmod(string|DateTimeInterface $date)

Sets the last modification date of the URL.

πŸ’‘ These macros can be chained for fluent configuration and better readability.

🧩 Model-driven Template class for easy implementation in sitemap

Use a custom Template that extends the abstract Template class:

Example custom Template for implementing dynamic routes in sitemap

Read more about all of the helper functions: template helper functions


πŸ“‚ Make an index for multiple sitemaps

Generate an index that references multiple sitemap files (e.g. per section):

You can dynamically add entries with an optional lastmod and pretty-print XML:

Alternatively, mark routes with an index and let the CLI generate the index and files for you:

This will produce sitemap-blog.xml, sitemap-pages.xml and an sitemap.xml index linking to them.

πŸ“– Read more: docs/sitemapindex.md


πŸ§ͺ Generating sitemaps

Or use the CLI:


πŸ–Ό Add images to the sitemap

Using Url instances directly

Via route macros


πŸ”— Meta tag helper

Outputs:


πŸ§ͺ Testing

SQLite must be enabled for in-memory testing.


πŸ“„ License

MIT Β© Gyvex.com


All versions of laravel-macro-sitemap with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^12.0|^13.0
scrumble-nl/popo Version ^1.0
ext-dom Version *
ext-simplexml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gyvex-com/laravel-macro-sitemap contains the following files

Loading the files please wait ...