PHPackages                             easy-slug/easy-slug - 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. easy-slug/easy-slug

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

easy-slug/easy-slug
===================

Laravel Package for creating a slug

v2.0.4(10y ago)1816.8k5[1 issues](https://github.com/viraj-khatavkar/easy-slug/issues)[2 PRs](https://github.com/viraj-khatavkar/easy-slug/pulls)1MITPHPPHP &gt;=5.4.0

Since Jan 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/viraj-khatavkar/easy-slug)[ Packagist](https://packagist.org/packages/easy-slug/easy-slug)[ RSS](/packages/easy-slug-easy-slug/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (10)Used By (1)

EasySlug (Laravel Package)
==========================

[](#easyslug-laravel-package)

[![SensioLabsInsight](https://camo.githubusercontent.com/73e036e7e534c42ff2c68c7025d41903cf639c5c1b800c61e790c7d83f552330/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f65303732646534392d313865342d346462612d383163342d3032373035666533323436372f736d616c6c2e706e67)](https://insight.sensiolabs.com/projects/e072de49-18e4-4dba-81c4-02705fe32467)

Quick start
-----------

[](#quick-start)

EasySlug provides a flexible way to create slugs. It is compatible with both **Laravel4** as well as **Laravel5**

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

[](#installation)

In order to install EasySlug, just add

```
"easy-slug/easy-slug": "2.0.*"

```

to your composer.json. Then run `composer install` or `composer update`.

Then in your `config/app.php` add

```
'EasySlug\EasySlug\EasySlugServiceProvider',

```

in the providers array and

```
'EasySlug' => 'EasySlug\EasySlug\EasySlugFacade'

```

to the `aliases` array.

Simple Slug with validation from database
-----------------------------------------

[](#simple-slug-with-validation-from-database)

You can make a simple slug with DB validation using following code

```
