Last active
October 24, 2017 10:27
-
-
Save jamierumbelow/7a077190549aef07310d4f6c010b5b4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #557799"><?php</span> | |
<span style="color: #008800; font-weight: bold">use</span> Illuminate\Contracts\Encryption\Encrypter; | |
<span style="color: #008800; font-weight: bold">public</span> <span style="color: #008800; font-weight: bold">function</span> <span style="color: #0066BB; font-weight: bold">getEmailAttribute</span>(<span style="color: #996633">$value</span>) | |
{ | |
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #996633">$value</span> <span style="color: #333333">?</span> app(Encrypter<span style="color: #333333">::</span><span style="color: #0000CC">class</span>)<span style="color: #333333">-></span><span style="color: #0000CC">decrypt</span>(<span style="color: #996633">$value</span>) <span style="color: #333333">:</span> <span style="color: #008800; font-weight: bold">null</span>; | |
} | |
<span style="color: #008800; font-weight: bold">public</span> <span style="color: #008800; font-weight: bold">function</span> <span style="color: #0066BB; font-weight: bold">setEmailAttribute</span>(<span style="color: #996633">$value</span>) | |
{ | |
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #996633">$this</span><span style="color: #333333">-></span><span style="color: #0000CC">attributes</span>[<span style="background-color: #fff0f0">'email'</span>] <span style="color: #333333">=</span> <span style="color: #996633">$value</span> <span style="color: #333333">?</span> app(Encrypter<span style="color: #333333">::</span><span style="color: #0000CC">class</span>)<span style="color: #333333">-></span><span style="color: #0000CC">encrypt</span>(<span style="color: #996633">$value</span>) <span style="color: #333333">:</span> <span style="color: #008800; font-weight: bold">null</span>; | |
} | |
</pre></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment