Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Nova Slug Field

Nova Slug Field Laravel Package

benjaminhirsch/nova-slug-field

A Laravel Nova field that auto-generates URL-friendly slugs from another field as you type, with support for custom separators, slug preview, and editable or read-only modes.

View on GitHub
Deep Wiki
Context7

A Laravel Nova field to generate a slugs.

Frequently asked questions about Nova Slug Field
How do I install benjaminhirsch/nova-slug-field in a Laravel Nova application?
Install it with Composer, then register the Slug field on a Nova resource and point it at a source attribute using ->from('title'). Place the source field above the slug field so editors see the value being slugified. Before adopting it, confirm that the Composer package name and the repository URL map to the same trusted code, because the package name and GitHub repository differ.
Which Laravel Nova versions does nova-slug-field support?
The last tagged release is dated 2023-12-27, and Nova 4 and Nova 5 differ in asset handling and frontend tooling. Check the installed composer.json constraint against your production PHP, Laravel, and Nova matrix instead of inferring support from the README. Validate the compiled field assets in staging before relying on it.
Does nova-slug-field enforce unique slugs?
No. The field only suggests URL-friendly values in the Nova form; it does not provide uniqueness enforcement or server-side slug governance. Your application still needs a unique database column, validation, and an authoritative server-side slug generator. Treat the Nova field as an admin-UI convenience, not a slug subsystem.
What happens to an existing slug when the source field changes?
The field watches the configured source attribute and slugifies its value as the editor types, so it can overwrite an existing slug if the field remains editable. That is risky for published content because changing a live URL breaks inbound links, analytics attribution, and SEO. Use read-only mode after publication or enforce application-level safeguards around slug changes.
Does nova-slug-field support localized or translatable slugs?
The provided context does not describe localized or per-locale slug support, which limits its usefulness if your roadmap includes multilingual content. For per-locale slugs and uniqueness, you would need a custom Nova field or application-level localization logic. Confirm current behavior by reading the installed source rather than relying on documentation.
Is benjaminhirsch/nova-slug-field safe to use in production?
The Composer package name and repository URL differ, so confirm the Packagist mapping, maintainer identity, and the actual code being installed before production use. The code surface is small and MIT-licensed, but ecosystem validation is thin: roughly 140 stars, zero listed dependents, a single-maintainer profile, and one reactive patch in December 2023. A documented fallback to a vendored fork or custom field reduces the risk.
How does nova-slug-field generate slugs as you type?
It is a Vue component that wraps Nova's built-in Text field and watches a configured source attribute. As the editor types in the source field, the component slugifies the value, with support for custom separators, a slug preview, and editable or read-only modes. It owns no persistence, routing, model behavior, or URL governance.
Do I still need server-side slug generation if I use this Nova field?
Yes. Seeders, imports, API writes, queue jobs, and console commands bypass Nova entirely, so content created through those paths will have no slug if the field is treated as the source of truth. Keep the application authoritative with an observer, service, or model hook plus a database unique constraint. Nova should be only the editing surface.
What should I do if nova-slug-field breaks after a Nova upgrade?
Nova major-version upgrades can break compiled field assets, and there is no SLA for this package. Pre-agree a fallback: vendor a fork under nova-components/, maintain a small custom Nova field, or move slug generation fully into the application. Assign ownership for that decision before adoption rather than during an upgrade incident.
What are alternatives to nova-slug-field for Laravel Nova slug fields?
Alternatives include a custom Nova field, a vendored fork of this package, or relying primarily on application-side slug generation with a simpler Nova text input. Because method names and options have shifted across minor versions, read the installed source rather than trusting documentation. Choose based on whether you need localization, slug history, redirects, or strict uniqueness enforcement.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console