PHPackages                             ka4ivan/laravel-sluggable - 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. [Database &amp; ORM](/categories/database)
4. /
5. ka4ivan/laravel-sluggable

ActiveLibrary[Database &amp; ORM](/categories/database)

ka4ivan/laravel-sluggable
=========================

Generate slugs when saving Eloquent models (multilingualism, multigroups, uniqueness)

1.0.2(1y ago)3181MITPHPPHP ^8.0.2

Since Feb 26Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/ka4ivan/laravel-sluggable)[ Packagist](https://packagist.org/packages/ka4ivan/laravel-sluggable)[ RSS](/packages/ka4ivan-laravel-sluggable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Model Sluggable (slugs) for Laravel Framework
=============================================

[](#model-sluggable-slugs-for-laravel-framework)

[![License](https://camo.githubusercontent.com/d4e3fa8c8a76842f11def52ad731a6382f50fe9404b29681ba423624500d64fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b61346976616e2f6c61726176656c2d736c75676761626c652e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ka4ivan/laravel-sluggable)[![Build Status](https://camo.githubusercontent.com/cb4331a1974686748af9a14b23d7329f4917ce4fd7ec89a25e9f50c5eda18870/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6b61346976616e2f6c61726176656c2d736c75676761626c652e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/ka4ivan/laravel-sluggable)[![Latest Stable Version](https://camo.githubusercontent.com/6442d261dcd7081cf2ba9760189df91602398e372d9c5f1bff4f4ca700f6667e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61346976616e2f6c61726176656c2d736c75676761626c652e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ka4ivan/laravel-sluggable)[![Total Downloads](https://camo.githubusercontent.com/60a38f09ed23cdf63701b7c23f7d8618b4570603045af93c6cefc789b5793778/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61346976616e2f6c61726176656c2d736c75676761626c652e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ka4ivan/laravel-sluggable)

📖 Table of Contents
-------------------

[](#-table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Preparing your model](#preparing-your-model)
    - [Base relationships](#base-relationships)
    - [Route binding](#route-binding)
    - [Base model usage](#base-model-usage)
        - [Individual settings for the model](#individual-settings-for-the-model)
        - [Search by slug](#search-by-slug)
    - [Slug generate command](#slug-generate-command)

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

[](#installation)

1. Require this package with composer

```
composer require ka4ivan/laravel-sluggable
```

2. Publish package resource:

```
php artisan vendor:publish --provider="Ka4ivan\Sluggable\ServiceProvider"
```

- config
- migration

#### This is the default content of the config file:

[](#this-is-the-default-content-of-the-config-file)

```
