Download the PHP package mfonte/laravel-sitemap without Composer

On this page you can find all versions of the php package mfonte/laravel-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-sitemap

Generate sitemaps with Laravel (or for a Non-Laravel project), compatible with Images Sitemap and News Sitemap

This package has been forked from spatie/laravel-sitemap, to remove support for SitemapGenerator, remove installation requirement for PHP 8, and add support for Images Sitemaps and News Sitemaps.

Additionally, this package adds support for installation outside a Laravel Project. See Using this package outside Laravel section.

This package can generate a valid sitemap by writing your own custom logic for the sitemap structure, via the API provided by this package.

Heads up! This package requires Laravel 9 or Laravel 10 For PHP 7.4 and Laravel 8 compatibility refer to v1.1.*

Latest Stable Version Total Downloads Coverage Status Scrutinizer Code Quality

Installation

For Laravel 9 or 10, or for a non-Laravel-based project running on PHP >= 8.0

composer require mfonte/laravel-sitemap

For Laravel 8, or for a non-Laravel-based project running on PHP >= 7.4 && < 8.0

composer require mfonte/laravel-sitemap "^1.1"

Creating sitemaps

You can only create your sitemap manually:

The sitemap generator can automatically understand what type of items you placed inside the sitemap, and create a valid schema accordingly. This is an example of a sitemap header with images and news:

You can also add your models directly by implementing the \Mfonte\Sitemap\Contracts\Sitemapable interface.

Now you can add a single post model to the sitemap or even a whole collection.

This way you can add all your pages super fast without the need to crawl them all.

Creating a sitemap index

You can create a sitemap index:

You can pass a Mfonte\Sitemap\Tags\Sitemap object to manually set the lastModificationDate property.

the generated sitemap index will look similar to this:

Using this package outside Laravel

The same instructions above apply, except for:

  1. You can not use Contracts\Sitemapable to extend a Model (you're not on Laravel, aren't you?)
  2. You have to use the Sitemap::render(), Sitemap::writeToFile(), SitemapIndex::render() and SitemapIndex::writeToFile() via providing the extra boolean flag $nativeRenderer = true
  3. You can not use Sitemap::writeToDisk(), Sitemap::toResponse(), SitemapIndex::writeToDisk() and SitemapIndex::toResponse()

So, for example, a basic approach may be:

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Credits

License

The MIT License (MIT). Please see https://github.com/spatie/laravel-sitemap and the relative license file has been migrated into this repository as-it-is.


All versions of laravel-sitemap with dependencies

PHP Build Version
Package Version
Requires ext-openssl Version >1.0.2
illuminate/support Version ^9.0 || ^10.0
illuminate/contracts Version ^9.0 || ^10.0
nesbot/carbon Version ^2.0
spatie/laravel-package-tools Version ^1.14
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 mfonte/laravel-sitemap contains the following files

Loading the files please wait ....