PHPackages                             malahierba-lab/public-id - 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. malahierba-lab/public-id

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

malahierba-lab/public-id
========================

Easy id obfuscation for Laravel. Powered by hashids

1.0.1(10y ago)713.3k4MITPHPPHP &gt;=5.5.18

Since Aug 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/malahierba-lab/public-id)[ Packagist](https://packagist.org/packages/malahierba-lab/public-id)[ RSS](/packages/malahierba-lab-public-id/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel Public ID
=================

[](#laravel-public-id)

A simple and automatic short ids (like youtube ids) generator for your laravel projects. Powered by Hashids project (and malahierba dev team)

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

[](#installation)

Add in your composer.json:

```
{
    "require": {
        "malahierba-lab/public-id": "1.*"
    }
}

```

Then you need run the `composer update` command.

**Very Important**: in composer.json use the "1.\*" notation, not the "&gt;1". If in future releases we change the conversion tool, you can loose your old public id values. For prevent this, always stay in the same mayor version.

Use
---

[](#use)

After Public ID installation, you must add the trait in any model which you want get public id functionality.

Example for Post Model:

```
