PHPackages                             benjaminhirsch/nova-slug-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. benjaminhirsch/nova-slug-field

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

benjaminhirsch/nova-slug-field
==============================

A Laravel Nova field to generate a slugs.

1.4.0(2y ago)1401.1M↓11.1%26[6 issues](https://github.com/tomhatzer/nova-slug-field/issues)[1 PRs](https://github.com/tomhatzer/nova-slug-field/pulls)11MITVuePHP &gt;=7.1.0

Since Aug 25Pushed 2y ago4 watchersCompare

[ Source](https://github.com/tomhatzer/nova-slug-field)[ Packagist](https://packagist.org/packages/benjaminhirsch/nova-slug-field)[ RSS](/packages/benjaminhirsch-nova-slug-field/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)DependenciesVersions (12)Used By (11)

Laravel Nova Slug Field
=======================

[](#laravel-nova-slug-field)

Simple Laravel Nova Slug field. Generating a slugified version of a text input. See the result of the slug while typing.

### Edit form

[](#edit-form)

[![details page select](https://raw.githubusercontent.com/benjaminhirsch/benjaminhirsch.github.io/master/repository-assets/nova-slug-demo.gif)](https://raw.githubusercontent.com/benjaminhirsch/benjaminhirsch.github.io/master/repository-assets/nova-slug-demo.gif)

Installation
------------

[](#installation)

In order to use this package, you need a Laravel installation which uses [Nova](https://nova.laravel.com).

**Composer**

```
composer require benjaminhirsch/nova-slug-field
```

Usage
-----

[](#usage)

Define the following fields in your resource in the `fields` method:

```
use Benjaminhirsch\NovaSlugField\Slug;
use Benjaminhirsch\NovaSlugField\TextWithSlug;

...

TextWithSlug::make('Name')
    ->slug('slug'),

Slug::make('Slug'),

```

##### Slug with a preview of the generated URL

[](#slug-with-a-preview-of-the-generated-url)

This will display the full URL including the generated slug as a link below the input field.

```
use Benjaminhirsch\NovaSlugField\Slug;
use Benjaminhirsch\NovaSlugField\TextWithSlug;

...

TextWithSlug::make('Name')
    ->slug('slug'),

Slug::make('Slug')
    ->showUrlPreview('http://www.foo.bar'),

```

##### Slug with disabled auto update

[](#slug-with-disabled-auto-update)

This is especially usefull, when you are updating the field which the slug belongs to and don't wan't the slug to be updated automatically.

```
use Benjaminhirsch\NovaSlugField\Slug;
use Benjaminhirsch\NovaSlugField\TextWithSlug;

...

TextWithSlug::make('Name')
    ->slug('slug'),

Slug::make('Slug')
    ->disableAutoUpdateWhenUpdating(),

```

This first field definition is the field which you want to create the slug of. The second field definition represents the slugified version. With the `->slug('name')` method, you define the name of the field which holds the slug. It is possible to create multiple slugs on a single resource, just add more field definitions. Every `TextWithSlug` field needs a corresponding `Slug` field.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity55

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~194 days

Recently: every ~426 days

Total

11

Last Release

919d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7a78e29597fc941f1f332d66890ddc285697e4f458f9d116115288e2a320f47?d=identicon)[tomhatzer](/maintainers/tomhatzer)

---

Top Contributors

[![benjaminhirsch](https://avatars.githubusercontent.com/u/2293943?v=4)](https://github.com/benjaminhirsch "benjaminhirsch (22 commits)")[![tomhatzer](https://avatars.githubusercontent.com/u/3952168?v=4)](https://github.com/tomhatzer "tomhatzer (4 commits)")[![cyriljulien](https://avatars.githubusercontent.com/u/49750071?v=4)](https://github.com/cyriljulien "cyriljulien (1 commits)")[![dennislindsey](https://avatars.githubusercontent.com/u/7014018?v=4)](https://github.com/dennislindsey "dennislindsey (1 commits)")[![drobee](https://avatars.githubusercontent.com/u/2998645?v=4)](https://github.com/drobee "drobee (1 commits)")[![duckzland](https://avatars.githubusercontent.com/u/1064954?v=4)](https://github.com/duckzland "duckzland (1 commits)")[![joonas1234](https://avatars.githubusercontent.com/u/35030215?v=4)](https://github.com/joonas1234 "joonas1234 (1 commits)")[![nick-f](https://avatars.githubusercontent.com/u/754567?v=4)](https://github.com/nick-f "nick-f (1 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (1 commits)")

---

Tags

laravellaravel-novanovasluglaravelnova

### Embed Badge

![Health badge](/badges/benjaminhirsch-nova-slug-field/health.svg)

```
[![Health](https://phpackages.com/badges/benjaminhirsch-nova-slug-field/health.svg)](https://phpackages.com/packages/benjaminhirsch-nova-slug-field)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3453.7M8](/packages/optimistdigital-nova-multiselect-field)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

52178.7k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17186.3k1](/packages/murdercode-nova4-tinymce-editor)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11273.0k](/packages/datomatic-nova-detached-actions)[wemersonrv/input-mask

A Laravel Nova custom field text with masks on input

1198.4k](/packages/wemersonrv-input-mask)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
