Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.8] Added native support for attribute encryption #29663

Closed
wants to merge 1 commit into from
Closed

[5.8] Added native support for attribute encryption #29663

wants to merge 1 commit into from

Commits on Aug 20, 2019

  1. Added native support for attribute encryption

    This PR is created so that models can have native attribute encryption, in the same way that they can be cast.
    
    A brief example might be something like the following:
    
    ```PHP
    class User extends Model
    {
        $encrypt = [
            'email'
        ];
    }
    ```
    
    Notice how we now have an array property on the model that can will encrypt and decrypt all attributes that are referenced within that array.  
    In our example, there is no need to create a getter/setter for the attributes that are required to be encrypted and will help reduce clutter of the model, especially if there are multiple columns that require encryption.
    BritishWerewolf authored Aug 20, 2019
    Configuration menu
    Copy the full SHA
    a5fc1d4 View commit details
    Browse the repository at this point in the history