Created
July 5, 2016 02:04
-
-
Save kareypowell/1855bcfd5f6d15a4ea16738db75dd977 to your computer and use it in GitHub Desktop.
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
App::singleton('tenant', function($app) { | |
$server = explode('.', Request::getHost()); | |
if (count($server) === 3 && $server[0] !== 'www') { | |
$organization = Organization::where('slug', $server[0])->firstOrFail(); | |
return $organization; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment