Created
October 14, 2021 21:59
-
-
Save luisalonsobr/d10c6b216ac8c5d6f62bc7196bfc233d to your computer and use it in GitHub Desktop.
Laravel snippets
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
/// GET ROUTE SUB DOMAIN | |
Request::macro('subdomain', function () { | |
return current(explode('.', $this->getHost())); | |
}); | |
$request->subdomain() | |
/////// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment