Download the PHP package the_elephpant/laravel-xml-sitemap without Composer

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

Sitemap for Laravel 5.6+

Laravel Sitemap

A simple sitemap generator for PHP Framework.

StyleCI Total Downloads Latest Stable Version Latest Unstable Version

Installation

For the 5.4 and 5.5 version of Laravel Framework, use version 3.

To get the latest version of Laravel Sitemap, simply require the project using Composer:

Instead, you may of course manually update your require block and run composer update if you so choose:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php:

You can also publish the config file to change implementations (ie. interface to specific class):

Now you can use a app('sitemap') method.

Upgrade Guides

Configuration

To configure the generation, you need to fill the models array in the config/sitemap.php file:

As the key of the array, you must use the model name for which the rules will be defined.

If any of the model values are undefined, a global value will be used.

Using

Manual

You can also transfer an array of items created manually:

Returned:

Also you can combine the data from the models builders with the transferred manually:

Images

Your can also transfer an array of image items created manually:

Returned:

Attention! Due to the different structure of documents, when trying to call method show(), an image map will be shown only if there are no calls to other methods.

Example:

The same principle applies when saving to one file - images will be ignored. But when saving to several files, the map will be successfully created.

Show

To display the content on the screen, use the show() method:

To return the content of the page, add any route:

And go to your URL. Example: http://mysite.dev/sitemap.

Save

If the option separate_files is DISABLED

To save the contents to the file, use the save() method:

If you want to save multiple files, pass the path to the file as a parameter to the save() method:

If the option separate_files is ENABLED

To save the contents to the separated files, use the save() method with 'separate_files' => true parameter in config/sitemap.php file.

In this case, the name of the file will be the default name from the settings: 'filename' => 'sitemap.xml'. The files are saved through the Storage facade (see config/sitemap.php).

Each model builder will be processed and saved in a separate file, and the shared file will contain references to it (with the selected a public storage name):

If you use a multi-domain application, you can specify the domain names of the generated links to other files, having pre-specified them in the settings:

This method will create files with the following links:

and

By default, the domain specified in APP_URL of .env file will be used.

If you want to save multiple files, pass the path to the file as a parameter to the save($path) method with 'separate_files' => true parameter in config/sitemap.php file:

Files will be created:

SEO

Sitemap is extremely useful when indexing a site by search bots. If you use a sitemap splitting into several files, you only need to add a link to the main file in the robots.txt file.

For example, you created several files:

In the robots.txt file, you only need to specify a link to the main file:

All the rest of the search bots will do for you.

Enjoy!

License

This package is licensed under the MIT License.


All versions of laravel-xml-sitemap with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3 || ^8.0
ext-dom Version *
dragon-code/xml-core Version ^2.1
illuminate/database Version ^5.6 || ^6.20.26 || ^7.30.3 || ^8.22.1 || ^9.0 || ^10.0
illuminate/support Version ^5.6 || ^6.20.26 || ^7.30.3 || ^8.22.1 || ^9.0 || ^10.0
nesbot/carbon Version ^1.25 || ^2.0
symfony/http-foundation Version ^4.0 || ^5.0 || ^6.0
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 the_elephpant/laravel-xml-sitemap contains the following files

Loading the files please wait ....