Qor Slug

Slug provides an easy way to create a pretty URL, a.k.a. Search Engine Friendly (SEF) URL, for your model.



Use slug.Slug as your field type with the same name as the benefactor field, from which the slug's value should be dynamically derived, and prepended with WithSlug, for example:

import (

type User struct {
  Name            string
  NameWithSlug    slug.Slug

In the QOR Admin, You can see:


Suppose you generate user profile page URL by NameWithSlug. The URL shall be /users/the-plant which is prettier and safer than /users/1.

results matching ""

    No results matching ""