{"id":19379630,"url":"https://github.com/larapack/attribute-encryption","last_synced_at":"2025-10-17T04:29:40.914Z","repository":{"id":57011714,"uuid":"46974176","full_name":"larapack/attribute-encryption","owner":"larapack","description":"Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.","archived":false,"fork":false,"pushed_at":"2016-03-04T09:13:40.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T23:54:53.871Z","etag":null,"topics":[],"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/larapack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-27T10:24:37.000Z","updated_at":"2019-08-29T14:40:16.000Z","dependencies_parsed_at":"2022-08-21T13:40:48.405Z","dependency_job_id":null,"html_url":"https://github.com/larapack/attribute-encryption","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larapack%2Fattribute-encryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larapack%2Fattribute-encryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larapack%2Fattribute-encryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larapack%2Fattribute-encryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larapack","download_url":"https://codeload.github.com/larapack/attribute-encryption/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250499925,"owners_count":21440716,"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":[],"created_at":"2024-11-10T09:10:46.322Z","updated_at":"2025-10-17T04:29:35.879Z","avatar_url":"https://github.com/larapack.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# attribute-encryption\nAllows you to define what attributes in your eloquent model which should be encrypted and decrypted.\n\n## Installing\n\nInstall using Composer `composer require larapack/attribute-encryption 1.*`.\n\n## Usage\n\nFirst add the traits `Manipulateable` and `Encryptable` to your Eloquent Model.\n```\n\u003c?php\n\nnamespace App;\n\nuse Larapack/AttributeManipulating/Manipulateable;\nuse Larapack/AttributeEncryption/Encryptable;\n\nclass User\n{\n  use Manipulateable;\n  use Encryptable;\n  \n  /**\n   * @var array List of attribute names which should be encrypted\n   */ \n  protected $encrypt = ['password']; // set the attribute names you which to encrypt/decrypt\n  \n  //...\n}\n```\n\nNow whenever you set the attribute `password` it will now be encrypted and whenever you get the attribute it will be decrypted.\n\nTest:\n```\n$user = new App\\User;\n$user-\u003epassword = 'secret';\necho $user-\u003egetOriginalAttribute('password'); // Here you will see the encrypted password\ndump($user); // Here you will see the encrypted password\necho $user-\u003epassword; // Here you will see the decrypted password\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarapack%2Fattribute-encryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarapack%2Fattribute-encryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarapack%2Fattribute-encryption/lists"}