PHPackages                             blake/laraveldoctrine-hashids - 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. blake/laraveldoctrine-hashids

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

blake/laraveldoctrine-hashids
=============================

Hashid type for Doctrine

v1.0.1(10y ago)10891[1 issues](https://github.com/bharley/laraveldoctrine-hashids/issues)MITPHPPHP &gt;=5.5.9

Since Feb 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/bharley/laraveldoctrine-hashids)[ Packagist](https://packagist.org/packages/blake/laraveldoctrine-hashids)[ Docs](https://github.com/blake/laraveldoctrine-hashids)[ RSS](/packages/blake-laraveldoctrine-hashids/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Doctrine Hashids
========================

[](#laravel-doctrine-hashids)

This package uses [vinkla](https://github.com/vinkla)'s [Hashids bridge for Laravel](https://github.com/vinkla/hashids) to provide a Doctrine type that obfuscates integer IDs using [Hashids](http://hashids.org/).

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

[](#installation)

Before installing this package, install and configure the [vinkla/hashids](https://github.com/vinkla/hashids) package.

Require this package using composer:

```
composer require "blake/laraveldoctrine-hashids:~1.0"

```

The next step is enabling the Doctrine type. If you are using the [laravel-doctrine/orm](https://github.com/laravel-doctrine/orm) package, add this to your `config/doctrine.php` file:

```
    'custom_types'              => [
        // ...
        'hashid' => Blake\Dbal\Types\HashidType::class,
    ],
```

Usage
-----

[](#usage)

Anywhere you are using an integer in your entities you may safely replace with the `hashid` type:

```
