Download the PHP package zarbinco/zarbin-seo without Composer

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

Zarbin SEO

Documentation: English · فارسی

Zarbin SEO is a lightweight, Laravel-native SEO toolkit for model-aware, route-aware, and multilingual metadata workflows.

It is inspired by common SEO editorial workflows and concepts popularized by tools such as Yoast SEO, but it is not a WordPress clone and is not affiliated with Yoast.

Development Status

Pre-stable / v0.2.x. The package has a tagged v0.2.0 release and is ready for early real-project usage, but the public API may still evolve before a stable v1.0 release.

Documentation

Features

Requirements

Installation

Publish Config

Optional resources:

The migration is only needed when you enable database-backed manual overrides. Views are only needed when you want to customize the optional Blade UI or form components. Translations are only needed when you want to customize the included English/Persian UI copy or add more languages.

5-Minute Setup

  1. Install the package:

  2. Publish the config:

  3. Add SEO tags to your layout <head>:

  4. Add one route page to config/zarbin-seo.php:

  5. Render that route's SEO from a controller or page:

  6. Optional: enable database overrides when editors should change SEO values from the UI:

Which Component Should I Use?

Goal Use
I want a ready admin page. Hosted UI routes.
I already have a product edit form. <x-zarbin-seo::model-fields />
I use a normal Controller + Blade form. name="seo" with SeoOverridePayload::fromRequest($request).
I use a stateful component form. wire-model="zarbinSeo" with SeoFieldValues and SeoOverridePayload::fromLivewire().
I use Vue, Inertia, SPA, API, or AJAX. Send a seo JSON object and normalize it with SeoOverridePayload.
I only want inventory tables. <x-zarbin-seo::routes /> or <x-zarbin-seo::models />

Do not place <x-zarbin-seo::model-form> or <x-zarbin-seo::route-form> inside another <form>. Use fields-only components inside forms your application already owns.

Quick Start

Render the current request SEO tags in your layout:

Resolve SEO data in a controller:

Or compose SEO data directly:

Model-Aware SEO

Models can implement Seoable and use HasSeo:

You can also configure mappings for normal Laravel or Eloquent-like models:

seo()->for($post)->get() resolves fallback defaults, configured mappings, Seoable values, multilingual state, optional database overrides, and optional commerce data.

Holder Pages

Model-backed holder pages such as ProductHolder, BlogHolder, or HomePage work like any other Seoable model:

Route-only holder pages can use route mappings instead.

Route-Only SEO

Configure SEO data for pages that do not have a model:

Use it in controllers, layouts, or middleware:

Rendering

Full render:

Segmented render methods:

Blade component:

Multilingual SEO

Enable localization and configure supported locales:

Locale URL strategies keep generated route URLs predictable:

Models can implement LocalizableSeo when they know which languages exist:

Missing translation strategies:

When alternates are available, Zarbin SEO renders:

Sitemap And Robots.txt

Public package routes are registered by default:

Projects that publish separate sitemap files per language can configure localized sitemap paths:

With that config, /sitemap-fa.xml renders fa URLs, /sitemap-en.xml renders en URLs, and /sitemap_index.xml lists both localized sitemap files. Localized sitemap routes return XML responses with application/xml content type. localized_paths controls the sitemap file paths. sitemap.base_url controls the host used for sitemap index URLs and robots.txt auto sitemap links, which is useful when the current request host differs from the public site host.

Sitemap hreflang alternates are disabled by default for cleaner sitemap XML output. Hreflang in the HTML <head> remains supported through normal rendering with seo()->alternates() and seo()->render().

Enable sitemap alternates only when you specifically want hreflang inside sitemap files:

When enabled, sitemap hreflang alternates are rendered as XML-safe xhtml:link elements. If a local browser/server displays sitemap XML as plain text with xhtml alternates enabled, keep include_alternates disabled or rely on HTML head hreflang.

If your local server or browser displays sitemap XML as plain text, switch the HTTP response type:

This affects HTTP sitemap routes only; Artisan command output remains a plain XML string. It is not a workaround for malformed XML; the sitemap XML itself must still parse cleanly.

Use locale or locales on route entries to control which localized sitemap includes each URL:

If a route entry has no locale or locales, it remains included as before for backward compatibility. When robots_txt.sitemaps is not manually configured, robots.txt points to the sitemap index.

Beginner rule of thumb:

Route sitemap entry:

Model sitemap source:

The source class should return an iterable, query, cursor, or collection of items that are allowed to be considered for sitemap output. This keeps production config cache friendly and avoids auto-crawling all model records.

Models may implement Sitemapable or expose matching methods:

Commands:

Commands do not write files unless --output is provided.

Optional Database Overrides

Publish and run the migration only when you want database-backed manual SEO overrides:

Enable both flags:

Save model overrides:

Save route overrides:

Eloquent models can use HasSeoMeta:

The package still works normally when database overrides are disabled or the table is missing.

Optional Plain Blade UI

The UI is disabled by default. It edits database override records and has no CSS framework or admin panel dependency.

Dedicated route UI:

The route UI lists configured route-only pages and shows completion status. ✓ means all required SEO fields are present; × means one or more required fields are missing. Required and recommended fields are configurable under ui.completion, and recommended misses appear as warnings only. The robots field is a dropdown with common presets from ui.robots_options; published Blade views can still be customized.

UI strings are translated through package language files. English and Persian are included out of the box, and you can publish them with:

The route edit screen and embeddable form show a search-result-style preview for the SEO title, canonical URL, and meta description, plus the raw generated HTML preview. The search preview is a visual approximation for editing comfort; it is not a ranking or snippet-display guarantee.

By default, the UI uses the package's standalone layout. To render it inside your application's admin layout, switch to host mode:

Direction is locale-aware by default. direction.mode accepts auto, rtl, or ltr; in auto mode Persian, Arabic, Hebrew, Urdu, Kurdish, Central Kurdish, Pashto, Sindhi, and Yiddish render RTL by default, while English and normal LTR locales render LTR. URLs, canonical inputs, and raw HTML/code previews remain LTR for readability.

Embeddable Blade Components

The preferred integration path for existing admin panels is to build your own admin page and render Zarbin SEO components inside your layout. Hosted UI routes remain available, but you do not have to adapt your admin layout to the package layout.

Full panel inside a custom admin layout:

Route inventory only:

Model inventory only:

Route edit form:

Model edit form:

Use fields-only components when your admin page already owns the form submission:

Search preview, raw HTML preview, and alerts are also available:

Publish package views to customize component markup:

Namespaced components are recommended because they avoid collisions. Optional global aliases can be enabled when you want shorter component names:

Using SEO fields inside existing forms

Do not place the full <x-zarbin-seo::model-form> or <x-zarbin-seo::route-form> inside another form. Use fields-only components inside existing host forms.

Standard Blade form:

Controller:

Stateful component form:

For create screens, save the model first, then call seo()->saveOverride() for the created model instance.

SEO analysis lights

The UI includes simple red/yellow/green SEO guidance indicators. They check practical basics such as title presence and length, meta description presence and length, canonical URL, and robots indexability. Optional image and schema checks can be enabled in analysis.checks.

These indicators are not Yoast and are not affiliated with Yoast. They are lightweight, configurable package checks for editing feedback. Analysis appears in route/model inventories, full forms, fields-only components, and the preview component.

UI styling and design-system integration

The package does not depend on any CSS framework or admin UI stack. The default UI preset is unstyled, which keeps output minimal and semantic. For projects that use utility-style classes, enable the optional utility preset:

The package only emits class strings. Styling remains owned by the host application. For a fully project-owned class map, use custom:

Any preset class can be overridden key by key through ui.classes:

Field layout can be tuned without editing views. full_width_fields span the full grid on tablet/desktop, while compact_fields remain normal grid columns:

RTL/LTR detection remains automatic. Search-preview text follows the selected locale direction, while canonical URLs and raw HTML previews stay LTR.

Model and holder inventory is opt-in. The package does not crawl every model class and does not run Model::query()->get() automatically. To list products, posts, pages, or holder-like models in the dedicated UI, enable model inventory globally and provide an explicit source for each configured model:

Model edit screens use the same database override system as route edit screens, so saving a model item stores an override for that specific model instance and optional locale.

Model sitemap controls

SEO overrides do not automatically add model items to sitemap output. Sitemap inclusion is explicit:

  1. Configure a model sitemap source.
  2. Choose an include mode: all, overrides, or none.
  3. For overrides, check "Include in sitemap" in the SEO UI or save seo_meta.extra.sitemap.include = true.

The sitemap controls in forms and fields-only components store values inside seo_meta.extra:

Example model sitemap config:

sitemap.source can be a class-string provider, callable, iterable, query, or cursor-like source. Class-string providers are recommended for production config caching. The package never falls back to crawling all records with Model::query()->get().

Localized canonical URL mapping

Sitemap generation cannot always guess a project's public URL structure. For prefixed-locale applications, configure explicit URL mapping so product URLs become /fa/products/slug instead of a legacy ?locale=fa fallback.

Route-only pages can use the same mapping:

Supported URL mapping strategies are pattern, route, localized_routes, and class. Database override canonicals still win when explicitly saved, and existing seoCanonicalUrl() / route fallback behavior remains available for backward compatibility.

If a canonical URL is explicitly saved in seo_meta, sitemap generation, admin previews, and rendered canonical tags keep using that saved override until you edit it in the SEO UI or delete/re-save the override. In prefixed-locale projects, saved canonical values should match the real public URL shape, such as /fa/products/slug.

Run the doctor to catch accidental query-locale URLs produced by current URL generation in prefixed-locale projects:

Published view compatibility

Published views under resources/views/vendor/zarbin-seo override package view updates. If an old published fields view is missing current classes or wire:model bindings, embedded fields can render without styling or fail to update host form state.

Critical package views include compatibility markers. The doctor warns with ui.published_views.stale when a published critical view is missing or has an old marker. Fix by republishing or manually merging:

Troubleshooting

Problem First checks
Fields do not update in a stateful form. Confirm rendered inputs include wire:model, then run php artisan zarbin-seo:doctor to check for stale published views.
Inputs have no visible styling. Republish or merge zarbin-seo-views, or configure ui.classes for your design system.
A product is not in sitemap. Check the model sitemap source, include mode, seo_meta.extra.sitemap.include, and canonical URL.
URLs look like ?locale=fa. Add explicit URL pattern mapping such as /{locale}/products/{slug}.
Sitemap or robots routes seem ignored. Static files like public/sitemap.xml or public/robots.txt can be served before Laravel routes; rename or remove them if package routes should handle those URLs.

The original embeddable form component remains available for custom save flows:

Product / Commerce Schema

Commerce support is disabled by default and does not depend on WooCommerce, Cashier, Bagisto, Aimeos, Vanilo, Stripe, Paddle, or any ecommerce package.

Offer generation is optional. The default auto mode builds an Offer only when real priced offer data exists, so corporate/catalog product pages can render valid Product schema without pretending to sell online. HTML/head SEO and commerce schema do not require an ecommerce package.

Model mapping:

Commerce mappings can read nested relations and locale-aware collections. This is useful when price or copy lives on translations, discounts, active offers, variants, or price rows.

Catalog product without Offer:

Ecommerce product with translated price:

Relation filter form:

Fallback arrays return the first non-empty value and preserve 0 / "0". Callables are also supported for project-specific lookups.

Contract-based product data:

Fluent commerce data:

Product holder and listing pages should usually remain CollectionPage. ItemList schema may be added in a future phase.

Artisan Commands

Install:

Doctor/readiness checks:

Production readiness / Doctor

Run the doctor before deploying or tagging a release:

Normal mode reports warnings but exits successfully. --strict escalates fail-level production risks, and --json returns stable keyed result entries for CI or release checklists.

The doctor checks for public sitemap.xml / robots.txt files that can shadow package routes, database override table readiness, UI route middleware/gate protection, config-cache unsafe closures, sitemap base URL and localized path issues, model inventory source safety, and published config/views/translations that may need manual merging after upgrades.

Inspect resolved SEO data:

Export sitemap or robots output:

Commands are safe by default: no model crawling unless explicitly requested, no migrations unless --run-migrations is provided, and no file writes unless --output is provided.

Configuration Reference

Important config areas:

Testing

Consumer App Smoke Test

Before releasing a new tag, you can run a real Laravel consumer-app smoke test:

The script creates a temporary Laravel app, installs this package through a Composer path repository, and verifies package discovery, publish tags, commands, sitemap/robots routes, and Blade rendering. See docs/e2e.md.

Hardening / Bulletproof Tests

The test suite includes bulletproof coverage for broken config, disabled features, missing database tables, invalid routes, malformed localization, UI/database mismatch, commerce edge cases, and rendering safety. See docs/hardening.md.

Changelog

See CHANGELOG.md.

Security

If you discover a security issue, please open a private/security report through GitHub if enabled, or contact the maintainer through the repository.

Credits

Zarbin / zarbinco

License

The MIT License (MIT). See LICENSE.md.


All versions of zarbin-seo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
spatie/laravel-package-tools Version ^1.93
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 zarbinco/zarbin-seo contains the following files

Loading the files please wait ...