Download the PHP package joelshepherd/create-with without Composer
On this page you can find all versions of the php package joelshepherd/create-with. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download joelshepherd/create-with
More information about joelshepherd/create-with
Files in joelshepherd/create-with
Package create-with
Short Description Easily add common unique identity fields to Laravel models.
License MIT
Informations about the package create-with
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
Dependencies
- PHP 7
- Laravel 5.*
Composer
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
Adds an unique UUID to the model.
Default options
getUuidField()
returnsuuid
Create with slug
Adds an unique slug to the model. This can optionally be based on a text string (like a title field on the model) and appended with a random slug if required for uniqueness.
Default options
getSlugField()
returnsslug
getSlugBaseText()
returnsnull
getSlugRandomLength()
returns7
Create with IP address
Adds the requester's IP address to the model.
Default options
getIpAddressField()
returnsip_address
Contributing
Submitting issues and pull requests for bugs, features and feature requests are welcome.
All versions of create-with with dependencies
ramsey/uuid Version ^3.6
illuminate/database Version ^5.0
illuminate/http Version ^5.0
illuminate/support Version ^5.0