-
-
Save brunocmoraes/ea45f70465c7fc43af8d3597505339e6 to your computer and use it in GitHub Desktop.
Single admin role to small projects
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
ADMIN_EMAILS=[email protected],[email protected] |
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
<?php | |
return ['admin_emails' => explode(', ', env('ADMIN_EMAILS'));] |
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
<?php | |
function isAdmin() { | |
$admin_emails = config('settings.admin_emails'); | |
if(in_array($this->email, $admin_emails) return true; | |
else return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment