Download the PHP package achyutn/laravel-seo without Composer

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

Laravel SEO

Packagist Version Packagist Downloads Packagist Stars Lint & Test PR

An opinionated Laravel SEO package to manage SEO on Eloquent models. This package makes use of an un-opinionated package ralphjsmit/laravel-seo and adds a pattern of auto-generating SEO metadata and sitemaps for Eloquent models with customization.

This package lets you generate SEO metadata and sitemap directly from Eloquent models without manually wiring SEO data in controllers or views. It supports multiple schema types including Page schema.

Installation

You can install the package via composer:

You must publish package config and migration stubs to your application using the following command:

This generates a config/seo.php configuration file and a migration file for the seo table in your database.

ralphjsmit/laravel-seo will also be installed as a dependency. Publishing the configuration and migration of that package will break the functionality of this package.
If you want full customization, I recommend you to check out that package directly from its GitHub repository.

Next, run the migration to create the seo table:

Usage

To use the package, simply add the AchyutN\LaravelSEO\Traits\InteractsWithSEO trait to any Eloquent model you want to manage SEO for.

This will automatically use the default columns (title, description, etc). You can also auto-generate schema markup for your model by implementing the respective methods or traits.

Generate SEO Entries

After adding the trait to your model, you need to generate SEO entries for existing records. You can do this by running the following Artisan command:

It also supports re-generating SEO entries for models that already have SEO data. You can use the --regenerate flag to update existing entries:

Schema Types

This package supports multiple schema types using traits:

Each schema trait implements a buildSchema(SchemaCollection $schema, ResolvedSEO $resolvedSEO) method, which receives resolved SEO data from your model. To use any schema, add the corresponding trait to your model along with the interface AchyutN\LaravelSEO\Contracts\HasMarkup.

Blog Schema

To use the Blog schema, add the AchyutN\LaravelSEO\Schemas\BlogSchema trait to your model:

Product Schema

To use the Product schema, add the AchyutN\LaravelSEO\Schemas\ProductSchema trait to your model:

Page Schema

To use the Page schema, add the AchyutN\LaravelSEO\Schemas\PageSchema trait to your model:

Breadcrumbs

You can also manage breadcrumbs by defining a breadcrumbs() method on your model that returns an array of Breadcrumb items.

Rendering SEO Tags

To render the SEO tags in your views, you can use the following Blade directive:

Replace $model with the instance of your Eloquent model.

Sitemaps

Once you have models using the InteractsWithSEO trait, you automatically have them included in your sitemap. You can access the sitemap in two formats:

The XML sitemap will be auto-injected in your blade layout along with the metadata.

Customization

This package resolves SEO data using a simple priority order:

  1. A custom *Value() method, if defined on the model
  2. A custom $*Column property, if defined on the model
  3. A default column name

You can customize each field independently.

Resolution Priority

For each field:

  1. *Value() method
  2. $*Column property
  3. Default column name

Methods always take precedence over properties.

Supported Override Methods

Define these on your model when the value is computed or derived. Organized by context:

Common Methods
Method Return Type When to use
titleValue() ?string Computed or dynamic title
descriptionValue() ?string Generated description
categoryValue() ?string Derived category
imageValue() ?string Media URL
authorValue() ?string Relation-based author
authorUrlValue() ?string Author profile link
publisherValue() ?string Brand or company name
publisherUrlValue() ?string Publisher homepage
tagsValue() array<string> Normalized tags
urlValue() ?string The page URL
publishedAtValue() ?Carbon Computed publish date
modifiedAtValue() ?Carbon Computed updated date
pageTypeValue() ?string Custom page type
Product-Specific Methods
Method Return Type When to use
brandValue() ?string Product brand
priceValue() ?float Product price
discountPriceValue() ?float Discounted price
currencyValue() ?string Price currency
availabilityValue() bool Product availability
skuValue() ?string Product SKU
Page-Specific Methods
Method Return Type When to use
pageTypeValue() ?string Type of page (landing, about, etc.)
Example

Supported Properties

Define these on your Eloquent model to change which column is used. Organized by context:

Common Properties
Property Default Purpose
$titleColumn title Page title
$descriptionColumn description Meta description
$categoryColumn category Content category
$imageColumn image Open Graph image
$authorColumn author Author name
$authorUrlColumn author_url Author profile URL
$publisherColumn publisher Publisher name
$publisherUrlColumn publisher_url Publisher URL
$tagsColumn tags Tags or keywords
$urlColumn url The page URL
$publishedAtColumn created_at Publish date
$modifiedAtColumn updated_at Updated date
$pageTypeColumn page_type Page type
Product-Specific Properties
Property Default Purpose
$brandColumn brand Product brand
$priceColumn price Product price
$discountPriceColumn discount_price Discounted price
$currencyColumn currency Price currency
$availabilityColumn is_available Product availability
$skuColumn sku Product SKU
Example

Notes

License

This package is open-sourced software licensed under the MIT license.

Contributing

Contributions are welcome! Please create a pull request or open an issue if you find any bugs or have feature requests.

Support

If you find this package useful, please consider starring the repository on GitHub to show your support.


All versions of laravel-seo with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ralphjsmit/laravel-seo Version ^1.7
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 achyutn/laravel-seo contains the following files

Loading the files please wait ...