Created
September 9, 2018 12:37
-
-
Save exileed/004e85f7a7e3e5902a560f071ea3152a 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
<?php | |
class AbstractEntity extends Entity | |
{ | |
protected static $applyScope = true; | |
public static function boot() | |
{ | |
parent::boot(); | |
if(static::$applyScope) { | |
static::addGlobalScope(new Scope); | |
} | |
} | |
} | |
# ------------------------- | |
class Admin extends AbstractEntity | |
{ | |
protected static $applyScope = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment