Download the PHP package bkwld/sitemap-from-routes without Composer

On this page you can find all versions of the php package bkwld/sitemap-from-routes. 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 sitemap-from-routes

Sitemap from Routes

Generate a sitemap directly from your Laravel routes/web.php using roumen/sitemap.

This works because, during install, you change the Route facade to point to a class of this package that adds a the fluent sitemap to Laravel Route instances. The sitemap method looks at the uri of the route and unpacks any model bindings it finds, fetching all public instances of those models and adding them to the sitemap.

Installation

  1. Run require add bkwld/sitemap-from-routes
  2. Install roumen/sitemap assets: php artisan vendor:publish --provider="Roumen\Sitemap\SitemapServiceProvider"
  3. Add a route for the sitemap to your routes file: Route::get('sitemap', '\Bkwld\SitemapFromRoutes\Controller@index').

Laravel < 5.5

  1. Add to config.app providers: Bkwld\SitemapFromRoutes\ServiceProvider::class
  2. Add to config.app aliases: 'Sitemap' => Bkwld\SitemapFromRoutes\Facades::class

Usage

Call sitemap() from any routes you want to add to the sitemap. For example:

Dynamic route parameters must be named the same as the models they should resolve. So, in the above example, you must have an App\Article model.

By default, all instances of a model are added to the sitemap by substituting the id of the model into the uri. Thus, the example route would generate news/1, news/2, and so on.

Customize the query

To customize which model instances should be added to the sitemap, specify a forSitemap scope on your model. You would do this to only add public records to the sitemap, for instance.

Customize the URL

To customize the URL that is added to the sitemap for model instances, specify a sitemapUrl accessor on your model. You would do this if you use slugs in your URLs.


All versions of sitemap-from-routes with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
illuminate/database Version ^5.0
illuminate/routing Version ^5.0
illuminate/support Version ^5.0
roumen/sitemap Version ^2.6
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 bkwld/sitemap-from-routes contains the following files

Loading the files please wait ....