Skip to content

Caroga/Laravel-UUID-Observers

Repository files navigation

Generating UUID and ApiTokens for Laravel Eloquent Models using Observers

Recently I needed to replace Eloquent's default auto-increment numeric ID with a UUID on a few of my models. This can be done in several ways, but after a good chat with the great people in the #Laravel channel on PHPNL's Slack team, I decided to use Laravel's Observers. Also, I needed to generate API Tokens for certain models, so why not use the same solution.

This is an example repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published