{"id":18941002,"url":"https://github.com/cleaniquecoders/profile","last_synced_at":"2026-04-02T19:24:02.265Z","repository":{"id":27820508,"uuid":"115283806","full_name":"cleaniquecoders/profile","owner":"cleaniquecoders","description":"Basic Profile Information using Polymorph","archived":false,"fork":false,"pushed_at":"2026-03-30T03:27:37.000Z","size":924,"stargazers_count":14,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-30T05:56:43.176Z","etag":null,"topics":["address","bank","email","laravel","package","polymorph","profile"],"latest_commit_sha":null,"homepage":null,"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":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"cleaniquecoders"}},"created_at":"2017-12-24T19:42:15.000Z","updated_at":"2026-03-30T03:27:41.000Z","dependencies_parsed_at":"2024-03-21T04:31:20.868Z","dependency_job_id":"6e25ba68-a020-4394-8507-71c5e5d5665c","html_url":"https://github.com/cleaniquecoders/profile","commit_stats":{"total_commits":109,"total_committers":4,"mean_commits":27.25,"dds":0.2018348623853211,"last_synced_commit":"930acb67070c6144117b2a12a309b07bf784527f"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/cleaniquecoders/profile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Fprofile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Fprofile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Fprofile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Fprofile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cleaniquecoders","download_url":"https://codeload.github.com/cleaniquecoders/profile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleaniquecoders%2Fprofile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31314375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["address","bank","email","laravel","package","polymorph","profile"],"created_at":"2024-11-08T12:25:14.601Z","updated_at":"2026-04-02T19:24:02.252Z","avatar_url":"https://github.com/cleaniquecoders.png","language":"PHP","funding_links":["https://github.com/sponsors/cleaniquecoders"],"categories":[],"sub_categories":[],"readme":"# Profile\n\nA Laravel package for managing profile information (addresses, emails, phone numbers, websites, and bank accounts) using polymorphic relationships.\n\n[![Latest Stable Version](https://poser.pugx.org/cleaniquecoders/profile/v/stable)](https://packagist.org/packages/cleaniquecoders/profile) [![Total Downloads](https://poser.pugx.org/cleaniquecoders/profile/downloads)](https://packagist.org/packages/cleaniquecoders/profile) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/cleaniquecoders/profile/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/cleaniquecoders/profile/?branch=master) [![License](https://poser.pugx.org/cleaniquecoders/profile/license)](https://packagist.org/packages/cleaniquecoders/profile)\n\n## Features\n\n- **Polymorphic Design** - Reusable profile tables for any model\n- **Trait-Based** - Use only what you need (addresses, emails, phones, websites, bank accounts)\n- **Type-Safe** - Query scopes for phone types and other filters\n- **Configurable** - Customize models and polymorphic type names\n- **UUID Support** - Unique identifiers for external integrations\n- **Soft Deletes** - Maintain audit trail of changes\n\n## Requirements\n\n- PHP ^8.3 | ^8.4\n- Laravel ^11.0 | ^12.0\n\n## Quick Start\n\n### Installation\n\n```bash\ncomposer require cleaniquecoders/profile\nphp artisan vendor:publish --tag=profile-migrations\nphp artisan migrate\nphp artisan profile:seed\n```\n\n### Basic Usage\n\nAdd the `HasProfile` trait to your model:\n\n```php\nuse CleaniqueCoders\\Profile\\Concerns\\HasProfile;\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass User extends Model\n{\n    use HasProfile;\n}\n```\n\nCreate profile information:\n\n```php\nuse CleaniqueCoders\\Profile\\Models\\PhoneType;\n\n// Create address\n$user-\u003eaddresses()-\u003ecreate([\n    'primary' =\u003e '123 Main Street',\n    'city' =\u003e 'Kuala Lumpur',\n    'postcode' =\u003e '50088',\n    'country_id' =\u003e 1,\n]);\n\n// Create phone numbers\n$user-\u003ephones()-\u003ecreate([\n    'phone_number' =\u003e '+60123456789',\n    'phone_type_id' =\u003e PhoneType::MOBILE,\n    'is_default' =\u003e true,\n]);\n\n// Create email\n$user-\u003eemails()-\u003ecreate([\n    'email' =\u003e 'john@example.com',\n    'is_default' =\u003e true,\n]);\n\n// Create website\n$user-\u003ewebsites()-\u003ecreate([\n    'url' =\u003e 'https://example.com',\n    'is_default' =\u003e true,\n]);\n```\n\nQuery profile information:\n\n```php\n// Get all addresses\n$addresses = $user-\u003eaddresses;\n\n// Get mobile phones only\n$mobilePhones = $user-\u003ephones()-\u003emobile()-\u003eget();\n\n// Get default email\n$email = $user-\u003eemails()-\u003ewhere('is_default', true)-\u003efirst();\n```\n\n## Available Traits\n\n| Trait | Purpose |\n|-------|---------|\n| `HasProfile` | Includes Addressable, Emailable, Phoneable, Websiteable |\n| `Addressable` | Manage physical addresses |\n| `Emailable` | Manage email addresses |\n| `Phoneable` | Manage phone numbers (with types: home, mobile, office, fax, other) |\n| `Websiteable` | Manage website URLs |\n| `Bankable` | Manage bank account information |\n\nUse individual traits for specific needs:\n\n```php\nuse CleaniqueCoders\\Profile\\Concerns\\Addressable;\nuse CleaniqueCoders\\Profile\\Concerns\\Phoneable;\n\nclass Company extends Model\n{\n    use Addressable, Phoneable;\n}\n```\n\n## Documentation\n\n📚 **[Complete Documentation](docs/)** - Comprehensive guides and API reference\n\n### Quick Links\n\n- [Installation Guide](docs/01-getting-started/01-installation.md)\n- [Configuration](docs/01-getting-started/02-configuration.md)\n- [Quick Start Examples](docs/01-getting-started/03-quick-start.md)\n- [Architecture Overview](docs/02-architecture/01-overview.md)\n- [Usage Guides](docs/03-usage/)\n- [API Reference](docs/04-api-reference/)\n- [Best Practices](docs/03-usage/07-best-practices.md)\n\n## Use Cases\n\n### Corporate Profiles\n\n```php\nclass Company extends Model\n{\n    use HasProfile, Bankable;\n}\n\n// Headquarters address\n$company-\u003eaddresses()-\u003ecreate([...]);\n\n// Contact information\n$company-\u003ephones()-\u003ecreate(['phone_type_id' =\u003e PhoneType::OFFICE, ...]);\n$company-\u003eemails()-\u003ecreate(['email' =\u003e 'info@company.com', ...]);\n$company-\u003ewebsites()-\u003ecreate(['url' =\u003e 'https://company.com', ...]);\n\n// Banking details\n$company-\u003ebanks()-\u003ecreate([...]);\n```\n\n### Employee Management\n\n```php\nclass Employee extends Model\n{\n    use HasProfile, Bankable;\n}\n\n// Home address for shipping\n$employee-\u003eaddresses()-\u003ecreate([...]);\n\n// Multiple contact numbers\n$employee-\u003ephones()-\u003ecreate(['phone_type_id' =\u003e PhoneType::MOBILE, ...]);\n$employee-\u003ephones()-\u003ecreate(['phone_type_id' =\u003e PhoneType::HOME, ...]);\n\n// Payroll bank account\n$employee-\u003ebanks()-\u003ecreate([...]);\n```\n\n### Customer Records\n\n```php\nclass Customer extends Model\n{\n    use HasProfile;\n}\n\n// Billing and shipping addresses\n$customer-\u003eaddresses()-\u003ecreate(['type' =\u003e 'billing', ...]);\n$customer-\u003eaddresses()-\u003ecreate(['type' =\u003e 'shipping', ...]);\n\n// Multiple contact methods\n$customer-\u003eemails()-\u003ecreate([...]);\n$customer-\u003ephones()-\u003emobile()-\u003ecreate([...]);\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Contributing\n\nContributions are welcome! Please see our [contribution guidelines](CONTRIBUTING.md) for details.\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleaniquecoders%2Fprofile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleaniquecoders%2Fprofile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleaniquecoders%2Fprofile/lists"}