Download the PHP package dominion-solutions/filament-seo without Composer

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

Filament SEO

Per-record SEO metadata for Laravel and Filament apps, exposed as form fields and rendered as a clean <head>.

Every indexable page gets its own title and meta description — authored in the admin panel, or derived from the record when an editor has not written one.

CI Packagist

What it does

Requirements

PHP 8.2+
Laravel 11.28, 12 or 13
Filament 5
Livewire 4.4+
Tailwind CSS 4.1+ (Filament's requirement)

Installation

Publish the config if you want to change defaults. This copies the config file and the migration into your application; the package loads its own migration either way.

Register the plugin on each panel that renders public pages:

The plugin deliberately does not render a <title> element. Filament already renders one from the page's title, and HasSeoMetadata points that at your SEO title — so exactly one <title> ends up in the head. Two titles is worse than none. Set render_title to true in the config only if your layout emits no title of its own.

Storing metadata on a model

Add the trait to any model you want to describe, and declare the HasSeo contract so the metadata is nameable and type-hintable:

getSeoData() returns the effective metadata: your stored row where it has a value, falling back to whatever the overrides below provide. saveSeo() creates the row on first save, and updates it in place after that.

To give a model sensible defaults, override the fallbacks:

getSeoFallbackImageAlt(), getSeoFallbackCanonicalUrl() and getSeoFallbackType() work the same way. robots has no fallback hook — it is index, follow until an editor changes it. The Text helper strips markup and clips a string to a budget that fits a meta description — use Text::fromMarkdown() when the source is Markdown.

With no overrides at all, the trait uses the first attribute it finds: name, title or headline for the title, and description, summary, excerpt, tagline, body or content for the description.

Editing metadata in Filament

Add the schema to a resource form:

That is the current Filament resource API; see the Filament guide for the surrounding form, and for what the plugin does on a panel with no resource.

Then hook persistence into the create and edit pages:

The seo.* form state is captured and stripped before the record is saved, so the nested array never reaches the model's attributes.

For records created or edited in a modal — a relation manager, or a CreateAction/EditAction — there are no resource page hooks to use. InteractsWithSeoActions covers those:

On edit actions, load the existing values with fillSeoFormData(...) in fillForm().

Describing a page

Public Filament pages hand their metadata to the render hook with HasSeoMetadata:

$heading is ?string, because that is how Filament declares it. Declaring it as string is a fatal error — PHP does not allow a subclass to narrow a property's type. Set it whenever the page renders a heading, or Filament will fall back to getTitle() and put your SEO title in the page body as well as the <head>.

Add a separator at the end of getTitle() for longer titles, e.g. 'About Us | My Company'. If a computed title needs to return an Htmlable, override getSeoTitle(): string|Htmlable; the description property is a string.

For a page that renders a record, override getSeoData() and fall back to the record's metadata — the hook picks up whatever it returns:

Panel-wide defaults

Metadata that applies to a whole panel goes in the config's site_name, or per page:

seoData() also accepts a SeoData, or a closure returning either — use a closure for multi-tenant panels, where the metadata depends on the current tenant.

Resolution order is page, then panel, then the request URL for canonical and app.name for the site name. The last two are layered underneath rather than merged over, so a page that sets its own site name or canonical URL keeps it.

Documentation

Detailed guides live in docs/:

Guide What it covers
Installation Composer, the plugin, the migration
Configuration Every config option, and when to reach for it
Models InteractsWithSeo, the HasSeo contract, generated fallbacks
Filament Panel defaults, pages, resource forms, modal actions
Architecture How the pieces fit together, with diagrams

Testing

Contributing

See CONTRIBUTING.md. In short: composer install, then composer check for lint, static analysis and tests.

License

MIT.


All versions of filament-seo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^5.0
illuminate/contracts Version ^11.28|^12.0|^13.0
illuminate/support Version ^11.28|^12.0|^13.0
livewire/livewire Version ^4.4.2
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 dominion-solutions/filament-seo contains the following files

Loading the files please wait ...