Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stayallive/laravel-eloquent-uuid
Generate a UUIDv4 for the primary key or any other attribute on an Eloquent model.
https://github.com/stayallive/laravel-eloquent-uuid
eloquent laravel-package
Last synced: 7 days ago
JSON representation
Generate a UUIDv4 for the primary key or any other attribute on an Eloquent model.
- Host: GitHub
- URL: https://github.com/stayallive/laravel-eloquent-uuid
- Owner: stayallive
- License: mit
- Created: 2022-02-26T18:52:29.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-13T21:34:01.000Z (10 months ago)
- Last Synced: 2024-05-02T05:24:28.129Z (8 months ago)
- Topics: eloquent, laravel-package
- Language: PHP
- Homepage:
- Size: 36.1 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Eloquent UUID
[![Latest Version](https://img.shields.io/github/release/stayallive/laravel-eloquent-uuid.svg?style=flat-square)](https://github.com/stayallive/laravel-eloquent-uuid/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/github/actions/workflow/status/stayallive/laravel-eloquent-uuid/ci.yaml?branch=master&style=flat-square)](https://github.com/stayallive/laravel-inverse-relations/actions/workflows/ci.yaml)
[![Total Downloads](https://img.shields.io/packagist/dt/stayallive/laravel-eloquent-uuid.svg?style=flat-square)](https://packagist.org/packages/stayallive/laravel-eloquent-uuid)Generate UUID for a Laravel Eloquent model attribute.
> **Note**
> This package still works great, however since Laravel 10 this package is no longer needed as Laravel now has a built-in UUID/ULID traits that work much the same as this package. Read more about UUID/ULID in the [Laravel documentation](https://laravel.com/docs/10.x/eloquent#uuid-and-ulid-keys).## Installation
```bash
composer require stayallive/laravel-eloquent-uuid
```## Usage
Adding the `UsesUUID` trait will ensure that the key attribute will be filled with a UUID.
```php
getKeyName();
}
}
```## Security Vulnerabilities
If you discover a security vulnerability within this package, please send an e-mail to Alex Bouma at `[email protected]`. All security vulnerabilities will be swiftly addressed.
## License
This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).