{"id":22614027,"url":"https://github.com/labrodev/laravel-uuidable","last_synced_at":"2026-01-21T03:03:10.620Z","repository":{"id":245722248,"uuid":"819025318","full_name":"labrodev/laravel-uuidable","owner":"labrodev","description":"Uuidable is a Laravel package that provides a reusable trait for automatically assigning a UUID to Eloquent models upon their creation. This package utilizes the Ramsey UUID library to ensure UUIDs are generated in a standard and reliable manner.","archived":false,"fork":false,"pushed_at":"2024-06-23T19:00:51.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-03T00:19:48.897Z","etag":null,"topics":["laravel","laravel-eloquent-models","laravel-model","laravel-packages","laravel-trait","laravel-uuid"],"latest_commit_sha":null,"homepage":"https://labrodev.substack.com/p/uuid-generation-in-eloquent-models","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labrodev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-23T15:06:07.000Z","updated_at":"2024-12-19T20:45:14.000Z","dependencies_parsed_at":"2025-02-14T11:41:39.764Z","dependency_job_id":"144b21a9-e7bf-4909-93fd-13dfcd7f0b37","html_url":"https://github.com/labrodev/laravel-uuidable","commit_stats":null,"previous_names":["labrodev/laravel-uuidable"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/labrodev/laravel-uuidable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Flaravel-uuidable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Flaravel-uuidable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Flaravel-uuidable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Flaravel-uuidable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labrodev","download_url":"https://codeload.github.com/labrodev/laravel-uuidable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Flaravel-uuidable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28624341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T02:47:06.670Z","status":"ssl_error","status_checked_at":"2026-01-21T02:45:44.886Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-eloquent-models","laravel-model","laravel-packages","laravel-trait","laravel-uuid"],"created_at":"2024-12-08T18:07:18.166Z","updated_at":"2026-01-21T03:03:10.607Z","avatar_url":"https://github.com/labrodev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Uuidable for Laravel\n\nUuidable is a Laravel package that provides a reusable trait for automatically assigning a UUID to Eloquent models upon their creation. This package utilizes the Ramsey UUID library to ensure UUIDs are generated in a standard and reliable manner.\n\n## Installation\n\nTo install the package, run the following command in your Laravel project:\n\n```bash\ncomposer require labrodev/uuidable\n```\n\n## Requirements\n\n- PHP 8.1 or higher\n\n## Configuration\n\nAfter installing the package, no additional configuration is needed to start using the UUID trait in your models.\n\n## Usage\n\nTo use the `ModelHasUuid` trait, simply include it in your Eloquent model:\n\n```php \n\n\u003c?php\n\nnamespace App\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Labrodev\\Uuidable\\ModelHasUuid;\n\nclass ExampleModel extends Model\n{\n    use ModelHasUuid;\n}\n```\n\nEnsure that your model has 'uuid' column in model database table. \n\nIf it is not, you may add it through Laravel migration: \n\n```php\n$table-\u003euuid('uuid');\n```\n\n## Override uuid column name\n\nIf the column in your database table designated for UUID storage has a name different from the default, you can customize the trait to accommodate this. \n\nSimply override the trait method in your model by adding the following method with your specific column name:\n\n```php \n/**\n* @return string\n*/\nprotected function fetchUuidColumn(): string\n{\n    return 'your-uuid-column-name';\n}\n```\n\n## Testing\n\nTo run the tests included with the package, execute the following command:\n\n```bash\ncomposer test\n```\n\nFor static analysis to check the package code, execute the followin command: \n\n```bash\ncomposer analyse\n```\n\n## Security\n\nIf you discover any security-related issues, please email admin@labrodev.com instead of using the issue tracker.\n\n## Credits\n\nLabro Dev\n\n## License\n\nThe MIT License (MIT). Please see License File for more information.\n\n## Read more\n\nRead more about this topic on our [Substack page - Labrodev](https://labrodev.substack.com/p/uuid-generation-in-eloquent-models).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabrodev%2Flaravel-uuidable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabrodev%2Flaravel-uuidable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabrodev%2Flaravel-uuidable/lists"}