PHPackages                             lukaskorl/uniquely - 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. lukaskorl/uniquely

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

lukaskorl/uniquely
==================

Uniquely identified models for Laravel 4 by using UUID as primary key

v1.0(11y ago)12.0kMITPHPPHP &gt;=5.4.0

Since Jun 9Pushed 11y ago1 watchersCompare

[ Source](https://github.com/lukaskorl/uniquely)[ Packagist](https://packagist.org/packages/lukaskorl/uniquely)[ RSS](/packages/lukaskorl-uniquely/feed)WikiDiscussions master Synced 1w ago

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

Uniquely identified models for Laravel 4
========================================

[](#uniquely-identified-models-for-laravel-4)

*Uniquely* uses UUIDv4 as primary key for [Laravel 4 Eloquent models](http://laravel.com/docs/eloquent). It automatically generates the UUID when your model is saved. *Uniquely* overwrites the `save()` method instead of attaching to Eloquent's `creating` event in order to circumvent some problems in combination with unit testing.

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

[](#installation)

To install *Uniquely* run

```
$ composer require lukaskorl/uniquely

```

You can specify `1.*` to include the most current version including possible future bugfixes.

**Manual installation**

If you choose to install *Uniquely* manually add the following line to your `composer.json`:

```
"require": {
    "lukaskorl/uniquely": "1.*"
}

```

and run

```
$ composer update

```

to install the package.

Usage
-----

[](#usage)

To use a *Uniquely* model simply extend your model class from `Lukaskorl\Uniquely\Model`.

```
