Last active
April 15, 2018 23:12
-
-
Save ldiebold/c157256efac2c5b2a528749e56d9f31b to your computer and use it in GitHub Desktop.
Check Laravel Environment
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 | |
if (App::environment('local')) { | |
// The environment is local | |
} | |
if (App::environment(['local', 'staging'])) { | |
// The environment is either local OR staging... | |
} | |
// or using the 'app' helper | |
if (app()->environment('local')) { | |
// The environment is local | |
} | |
if (app()->environment(['local', 'staging'])) { | |
// The environment is either local OR staging... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment