Documentation and knowledge base
A documentation URL is read aloud, pasted into tickets and printed in onboarding material. An id suffix is noise there, and the page titles are already unique.
#[Polyslug(source: 'title', idLess: true)] // /guide/installation — no _id suffix
class Guide extends Model implements Sluggable
{
use HasPolyslug;
}
Dropping the id means the slug carries identity, and Polyslug tightens the rules to match:
a superseded slug still resolves and 301s to the current one, and a retired slug stays
reserved so it can never be handed to a different page. Without that last rule, renaming
one guide and then titling another the same way would silently hijack the first one's
published URL.
The cost is that the slug must stay unique per (type, locale, scope) — pick titles that
stay distinct, and expect a -2 on genuine collisions.
Nesting the tree
Combine it with polyslugParent() for a fully readable
hierarchy — /guides/routing/installation — with no token anywhere in the path.