Download the PHP package basekit-laravel/basekit-laravel-seo without Composer

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

Basekit Laravel SEO

CI Packagist Docs

SEO metadata, structured data, robots.txt and XML sitemaps for Laravel.

Set page metadata from your application and render it with a single Blade component. The package supports standard metadata, Open Graph, Twitter/X, hreflang, JSON-LD, robots.txt and XML sitemaps.

Nothing is stored in the database, and values that you do not provide are simply omitted.

Requirements

Installation

Install the package:

Package discovery registers the service provider automatically.

Publish the configuration if you want to change the defaults:

Usage

Add the head component to your layout:

Then set metadata from a controller or anywhere else in the request:

The head component renders the values that were set and leaves everything else out.

Metadata

The seo() helper provides a fluent API for page metadata:

It also supports:

Explicit values override resolver and configuration defaults.

Resolvers

For models or other content types that know how their SEO metadata should be built, create a resolver implementing SeoResolver.

The first registered resolver that supports the subject provides its metadata. You can still override individual values afterwards:

Structured data

JSON-LD can be added through the schema() API.

The package includes builders for:

Plain arrays are also supported.

Open Graph and Twitter/X

Open Graph and Twitter/X metadata are rendered by the head component together with the standard page metadata.

Configure defaults globally or set values for individual requests through the seo() helper or a resolver.

Canonical URLs

Canonical URLs can be set explicitly:

When resolving canonical URLs automatically, the package uses the configured canonical base URL, then app.url, and finally an allow-listed request host.

The raw Host header is never used directly.

Alternate languages

Add hreflang alternates with:

Alternates are not generated automatically.

robots.txt

The package serves:

Its contents are configured through config/basekit-laravel-seo.php.

The sitemap URL can be included automatically using the canonical site origin.

XML sitemap

The package serves:

Register SitemapProvider implementations to contribute URLs.

Large sitemaps are automatically split according to the configured URL or byte limits:

When splitting is required, /sitemap.xml becomes a sitemap index.

Sitemap output is cached so providers only run on a cache miss. Concurrent requests on a cold cache take a short-lived lock, so only one rebuilds the sitemap.

Warm it after a deploy, and clear it when your content changes:

The equivalent API for application code (for example in a model observer):

HTTP caching

The sitemap and robots.txt endpoints send Cache-Control, an ETag and X-Content-Type-Options: nosniff, and answer 304 Not Modified to conditional requests, so a CDN can serve repeat crawls without hitting your application.

Freshness is controlled by sitemap.cache.ttl and robots.cache_ttl; setting either to 0 disables caching for that endpoint.

Configuration

The published configuration controls:

All defaults are optional.

Values the package cannot render a correct result with — such as sitemap.max_urls outside 1–50000 — are rejected while the service provider boots, so a misconfiguration fails the deploy instead of breaking a crawler later.

By default the package's routes carry no middleware. Add throttling yourself if you want it:

Custom views

Publish the package views:

You can then modify the provided templates or configure the package to use your own head view.

Security

URLs used for canonical links, Open Graph, Twitter/X, alternates and sitemaps are validated before output.

The package also escapes JSON-LD, XML, Open Graph and Twitter/X output and prevents robots.txt values from injecting additional directives.

Nothing is ever built from the raw Host header: sitemap index locations and the robots.txt Sitemap: declaration come from a trusted canonical origin only. A split sitemap refuses to render at all when no trusted origin can be established, rather than inventing one.

CI runs composer audit on every push, so a newly published advisory in the dependency tree fails the build.

Limitations

The package does not discover your application's content automatically.

Use SeoResolver implementations for page metadata and SitemapProvider implementations for sitemap entries.

The package does not provide:

Documentation

Full documentation:

https://basekit-laravel.github.io/basekit-laravel-seo/

It covers:

Testing

License

MIT.


All versions of basekit-laravel-seo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4|^8.5
illuminate/contracts Version ^13
illuminate/http Version ^13
illuminate/support Version ^13
illuminate/view Version ^13
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 basekit-laravel/basekit-laravel-seo contains the following files

Loading the files please wait ...