Created
November 13, 2014 12:53
-
-
Save alnutile/0eedd5231b33cf7611fc to your computer and use it in GitHub Desktop.
You need to set !== to set an exact match since 0 would = false otherwise and never be true here
This file contains hidden or 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
| public function getActiveAttribute($value) | |
| { | |
| if($this->site_override()->first() != null && ($this->site_override()->first()->active !== null)) | |
| { | |
| return $this->site_override()->first()->active; | |
| } | |
| return $value; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment