r15ch13 / peculiar
An extension to the Laravel Eloquent Model. It allows the use of UUIDs (ramsey/uuid) as primary keys.
Installs: 3 241
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- illuminate/database: ~4.0|~5.0
- ramsey/uuid: ~3.6
Requires (Dev)
- cartalyst/sentry: ~2.1
- laravelbook/ardent: ~2.0
- phpspec/phpspec: ~2.0
Suggests
- cartalyst/sentry: Extends the models of Cartalyst Sentry.
- laravelbook/ardent: Extends the model of Laravelbook Ardent.
README
An extension to the Laravel model. It allows the use of UUIDs as primary keys.
Installation
Add r15ch13/peculiar
as a requirement to composer.json
:
{ "require": { "r15ch13/peculiar": "~2.0" } }
Update your packages with composer update
or install with composer install
.
Getting Started
Peculiar
extends the Eloquent
base class without changing its core functionality.
To create a new Peculiar model, simply make your model class derive from the Peculiar
base class.
use Rfifteen\Peculiar\Peculiar; class User extends Peculiar {}
If you're using LaravelBook\Ardent use it like so:
use Rfifteen\Peculiar\Ardent\Peculiar; class User extends Peculiar {}
If you're using Cartalyst\Sentry use it like so:
use Rfifteen\Peculiar\Sentry\PeculiarUser; class User extends PeculiarUser {}