Skip to content

Add isEncryptedCastable #230

Open
Open

Description

@kiwina

Need to add a check to getModelAttributes if the value is isEncryptedCastable

Activity

  1. dwightwatson commented on Jul 13, 2021

    @dwightwatson
    Owner

    Happy to review a PR with tests that covers this functionality. Unfortunately I'm not in a position to work on this feature at the moment.

  2. kiwina commented on Jul 13, 2021

    @kiwina
    Author

    Will look into it i'm testing it at the moment to see if the implementation works properly or not, then i'll add some tests to it and make a PR
    currenty i have:
    if (method_exists($this, 'isEncryptedCastable') && $this->isEncryptedCastable($key)) { $attributes[$key] = $value; continue; }
    witch should work with older laravel versions

  3. kiwina commented on Jul 20, 2021

    @kiwina
    Author

    so after a little further testing the code isn't really necessary for it to work but if there is custom setters the encrypted attribute its necessary for it to work

  4. kiwina commented on Jul 26, 2021

    @kiwina
    Author

    I think i got it figured out now with the encryption so far none of my tests fail still a little testing to be done before i can make a pull request
    if (method_exists($this, 'isEncryptedCastable') && $this->isEncryptedCastable($key) && $this->getModel()->hasSetMutator($key)) { $attributes[$key] = $value; continue; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions