PHPackages                             joelshepherd/create-with - 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. joelshepherd/create-with

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

joelshepherd/create-with
========================

Easily add common unique identity fields to Laravel models.

0.4.0(8y ago)45.7k2[1 PRs](https://github.com/joelshepherd/create-with/pulls)MITPHPPHP &gt;=7.0

Since Jul 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/joelshepherd/create-with)[ Packagist](https://packagist.org/packages/joelshepherd/create-with)[ RSS](/packages/joelshepherd-create-with/feed)WikiDiscussions master Synced yesterday

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

Create With - Laravel Models
============================

[](#create-with---laravel-models)

A simple package that provides traits to add common indentity fields to Laravel models when they are created.

This package is designed to work out of the box with just the traits. No other configuration is needed.

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

[](#installation)

**Dependencies**

- PHP 7
- Laravel 5.\*

**Composer**

```
composer require joelshepherd/create-with

```

Usage
-----

[](#usage)

Simply add the trait to your model that provides your desired field. If the field is not empty and is unique in the database, it will be left unchanged.

### Create with UUID

[](#create-with-uuid)

Adds an unique UUID to the model.

**Default options**

- `getUuidField()` returns `uuid`

```
