2017 © Pedro Peláez
 

library eloquent-guidable

Eases using and generating guid's in Laravel Eloquent models.

image

kduma/eloquent-guidable

Eases using and generating guid's in Laravel Eloquent models.

  • Friday, October 21, 2016
  • by kduma
  • Repository
  • 1 Watchers
  • 0 Stars
  • 203 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

New Version

For new apps, please use the newer version available here: kduma/eloquent-uuidable, (*1)

L5-eloquent-guidable

Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight StyleCI, (*2)

Eases using and generating guid's in Laravel Eloquent models., (*3)

Setup

Add the package to the require section of your composer.json and run composer update, (*4)

"kduma/eloquent-guidable": "^1.1"

Prepare models

Inside your model (not on top of file) add following lines:, (*5)

use \KDuma\Eloquent\Guidable;

In database create guid string field. If you use migrations, you can use following snippet:, (*6)

$table->string('guid')->unique();

Usage

By default it generates slug on first save., (*7)

  • $model->newGuid() - Generate new guid. (Remember to save it by yourself)
  • Model::whereGuid($slug)->first() - Find by guid. (whereGuid is query scope)

Packagist

View this package on Packagist.org: kduma/eloquent-guidable, (*8)

The Versions

21/10 2016

dev-master

9999999-dev

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent

05/10 2016

2.0.1

2.0.1.0

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent

05/10 2016

2.01

2.01.0.0

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent

05/10 2016

2.0

2.0.0.0

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent

09/06 2015

v1.1.2

1.1.2.0

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent

01/05 2015

v1.1.1

1.1.1.0

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent

08/03 2015

v1.1

1.1.0.0

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent

05/03 2015

v1.0.1

1.0.1.0

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent

05/03 2015

v1.0

1.0.0.0

Eases using and generating guid's in Laravel Eloquent models.

  Sources   Download

MIT

The Requires

 

laravel uuid guid eloquent