{"id":20244788,"url":"https://github.com/renoki-co/laravel-useful-casts","last_synced_at":"2025-10-12T20:21:41.916Z","repository":{"id":36980628,"uuid":"302723910","full_name":"renoki-co/laravel-useful-casts","owner":"renoki-co","description":"Laravel Useful Casts is a simple package for Laravel 7.0+ that comes with already-tested and already-written, useful casts for Eloquent models.","archived":false,"fork":false,"pushed_at":"2024-01-01T03:05:46.000Z","size":75,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T18:21:18.464Z","etag":null,"topics":["casts","database","eloquent","eloquent-models","laravel","laravel-package","orm","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renoki-co.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"rennokki"}},"created_at":"2020-10-09T18:32:35.000Z","updated_at":"2023-04-15T01:54:37.000Z","dependencies_parsed_at":"2023-01-17T11:30:32.983Z","dependency_job_id":null,"html_url":"https://github.com/renoki-co/laravel-useful-casts","commit_stats":{"total_commits":58,"total_committers":6,"mean_commits":9.666666666666666,"dds":0.5344827586206897,"last_synced_commit":"d7ecc30ea4edbb764d661692864fbb4954a8563c"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":"renoki-co/laravel-package-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renoki-co%2Flaravel-useful-casts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renoki-co%2Flaravel-useful-casts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renoki-co%2Flaravel-useful-casts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renoki-co%2Flaravel-useful-casts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renoki-co","download_url":"https://codeload.github.com/renoki-co/laravel-useful-casts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248296494,"owners_count":21080301,"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":["casts","database","eloquent","eloquent-models","laravel","laravel-package","orm","php"],"created_at":"2024-11-14T09:17:23.268Z","updated_at":"2025-10-12T20:21:36.876Z","avatar_url":"https://github.com/renoki-co.png","language":"PHP","funding_links":["https://github.com/sponsors/rennokki"],"categories":[],"sub_categories":[],"readme":"Laravel Useful Casts\n====================\n\n![CI](https://github.com/renoki-co/laravel-useful-casts/workflows/CI/badge.svg?branch=master)\n[![codecov](https://codecov.io/gh/renoki-co/laravel-useful-casts/branch/master/graph/badge.svg)](https://codecov.io/gh/renoki-co/laravel-useful-casts/branch/master)\n[![StyleCI](https://github.styleci.io/repos/302723910/shield?branch=master)](https://github.styleci.io/repos/302723910)\n[![Latest Stable Version](https://poser.pugx.org/renoki-co/laravel-useful-casts/v/stable)](https://packagist.org/packages/renoki-co/laravel-useful-casts)\n[![Total Downloads](https://poser.pugx.org/renoki-co/laravel-useful-casts/downloads)](https://packagist.org/packages/renoki-co/laravel-useful-casts)\n[![Monthly Downloads](https://poser.pugx.org/renoki-co/laravel-useful-casts/d/monthly)](https://packagist.org/packages/renoki-co/laravel-useful-casts)\n[![License](https://poser.pugx.org/renoki-co/laravel-useful-casts/license)](https://packagist.org/packages/renoki-co/laravel-useful-casts)\n\nLaravel Useful Casts is a simple package for Laravel 7.0+ that comes with already-tested and already-written, useful casts for Eloquent models.\n\n## 🤝 Supporting\n\n**If you are using one or more Renoki Co. open-source packages in your production apps, in presentation demos, hobby projects, school projects or so, sponsor our work with [Github Sponsors](https://github.com/sponsors/rennokki). 📦**\n\n[\u003cimg src=\"https://github-content.s3.fr-par.scw.cloud/static/26.jpg\" height=\"210\" width=\"418\" /\u003e](https://github-content.renoki.org/github-repo/26)\n\n## 🚀 Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require renoki-co/laravel-useful-casts\n```\n\n## 🙌 Usage\n\n```php\nuse RenokiCo\\UsefulCasts\\Casts\\Encrypted;\n\nclass User extends Model\n{\n    protected $casts = [\n        'ssn' =\u003e Encrypted::class,\n    ];\n}\n\n// 'ssn' value gets encrypted in the database.\n$user-\u003eupdate(['ssn' =\u003e '12345678']);\n```\n\n## Available Casts\n\n| Cast class | Purpose |\n|------------|---------|\n| `RenokiCo\\UsefulCasts\\Casts\\Encrypted::class` | Encrypts and decrypts a value from the database |\n| `RenokiCo\\UsefulCasts\\Casts\\Arrayed::class` | Serializes and unserialies an array. If the value is null, returns an empty array. |\n| `RenokiCo\\UsefulCasts\\Casts\\EncryptedArray::class` | Encrypts and decrypts a value from the database, making sure it's always an array, even if the value is set or get as `null` |\n\n## 🐛 Testing\n\n``` bash\nvendor/bin/phpunit\n```\n\n## 🤝 Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## 🔒  Security\n\nIf you discover any security related issues, please email alex@renoki.org instead of using the issue tracker.\n\n## 🎉 Credits\n\n- [Alex Renoki](https://github.com/rennokki)\n- [All Contributors](../../contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenoki-co%2Flaravel-useful-casts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenoki-co%2Flaravel-useful-casts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenoki-co%2Flaravel-useful-casts/lists"}