{"id":18941016,"url":"https://github.com/cleaniquecoders/traitify","last_synced_at":"2025-12-27T13:29:57.732Z","repository":{"id":257827258,"uuid":"872974112","full_name":"cleaniquecoders/traitify","owner":"cleaniquecoders","description":"Traitify is a Laravel package designed to streamline and enhance your development process by providing a collection of reusable traits and contracts. ","archived":false,"fork":false,"pushed_at":"2024-11-27T02:35:11.000Z","size":46,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-29T02:04:32.300Z","etag":null,"topics":["laravel","php","trait","uuid"],"latest_commit_sha":null,"homepage":"","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/cleaniquecoders.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":"Cleanique Coders"}},"created_at":"2024-10-15T11:52:59.000Z","updated_at":"2024-11-27T02:35:15.000Z","dependencies_parsed_at":"2024-10-17T14:03:38.355Z","dependency_job_id":null,"html_url":"https://github.com/cleaniquecoders/traitify","commit_stats":null,"previous_names":["cleaniquecoders/traitify"],"tags_count":2,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Ftraitify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Ftraitify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Ftraitify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Ftraitify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cleaniquecoders","download_url":"https://codeload.github.com/cleaniquecoders/traitify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249138859,"owners_count":21218961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","php","trait","uuid"],"created_at":"2024-11-08T12:25:18.260Z","updated_at":"2025-12-27T13:29:57.726Z","avatar_url":"https://github.com/cleaniquecoders.png","language":"PHP","funding_links":["https://github.com/sponsors/Cleanique Coders"],"categories":[],"sub_categories":[],"readme":"# Traitify\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/cleaniquecoders/traitify.svg?style=flat-square)](https://packagist.org/packages/cleaniquecoders/traitify)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/cleaniquecoders/traitify/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/cleaniquecoders/traitify/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/cleaniquecoders/traitify/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/cleaniquecoders/traitify/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/cleaniquecoders/traitify.svg?style=flat-square)](https://packagist.org/packages/cleaniquecoders/traitify)\n\nA Laravel package that streamlines development with reusable traits, contracts, and a powerful value generator system. Reduce boilerplate, standardize behavior, and enhance your models with automatic UUID, token, and slug generation.\n\n## ✨ Features\n\n- 🔧 **11 Reusable Traits** - UUID, Token, Slug, Meta, User, API, Search, and more\n- 🎨 **Customizable Generators** - Flexible token, UUID, and slug generation\n- ⚙️ **Three-Tier Configuration** - Model → Config → Default resolution\n- 🔌 **Extensible Architecture** - Create custom generators easily\n- 📦 **Zero Configuration** - Works out of the box with sensible defaults\n- ✅ **100% Tested** - Comprehensive test coverage with Pest PHP\n\n## 📦 Installation\n\n```bash\ncomposer require cleaniquecoders/traitify\n```\n\n## 🚀 Quick Start\n\n```php\nuse CleaniqueCoders\\Traitify\\Concerns\\InteractsWithUuid;\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Post extends Model\n{\n    use InteractsWithUuid;\n\n    // UUID automatically generated on creation\n}\n```\n\n```php\n$post = Post::create(['title' =\u003e 'Hello World']);\necho $post-\u003euuid; // 9d9e8da7-78c3-4c9d-9f5e-5c8e4a2b1d3c\n```\n\n## 📚 Documentation\n\n- **[Documentation Home](docs/README.md)** - Complete documentation index\n- **[Getting Started](docs/01-getting-started/README.md)** - Installation and setup\n- **[Architecture](docs/02-architecture/README.md)** - System design and patterns\n- **[Traits Reference](docs/03-traits/README.md)** - All available traits\n- **[Generators](docs/04-generators/README.md)** - Customizable value generation\n- **[Configuration](docs/05-configuration/README.md)** - Configuration options\n- **[Examples](docs/06-examples/README.md)** - Real-world usage examples\n- **[Advanced](docs/07-advanced/README.md)** - Extend and customize\n\n## 🔥 Popular Use Cases\n\n### Auto-Generate UUIDs\n```php\nuse InteractsWithUuid;\n\nprotected $uuid_column = 'id'; // Use UUID as primary key\n```\n\n### Secure API Tokens\n```php\nuse InteractsWithToken;\n\nprotected $tokenGeneratorConfig = [\n    'length' =\u003e 64,\n    'prefix' =\u003e 'sk_',\n    'pool' =\u003e 'hex',\n];\n```\n\n### SEO-Friendly Slugs\n```php\nuse InteractsWithSlug;\n\nprotected $slugGeneratorConfig = [\n    'unique' =\u003e true,\n    'max_length' =\u003e 100,\n];\n```\n\n## 🧪 Testing\n\n```bash\ncomposer test\n```\n\n## 📖 Available Traits\n\n| Trait | Purpose |\n|-------|---------|\n| `InteractsWithUuid` | Auto-generate UUIDs |\n| `InteractsWithToken` | Generate secure tokens |\n| `InteractsWithSlug` | Create URL-friendly slugs |\n| `InteractsWithMeta` | Manage JSON metadata |\n| `InteractsWithUser` | Auto-assign user relationships |\n| `InteractsWithApi` | API response formatting |\n| `InteractsWithSearchable` | Full-text search |\n| `InteractsWithDetails` | Eager load relationships |\n| `InteractsWithEnum` | Enum helper methods |\n| `InteractsWithResourceRoute` | Resource route generation |\n| `InteractsWithSqlViewMigration` | SQL view migrations |\n\n## 🤝 Contributing\n\nContributions are welcome! Please see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## 🔒 Security\n\nIf you discover any security issues, please review our [security policy](../../security/policy).\n\n## 📝 Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for recent changes.\n\n## 👥 Credits\n\n- [Nasrul Hazim Bin Mohamad](https://github.com/nasrulhazim)\n- [All Contributors](../../contributors)\n\n## 📄 License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleaniquecoders%2Ftraitify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleaniquecoders%2Ftraitify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleaniquecoders%2Ftraitify/lists"}