Last active
October 10, 2017 08:16
-
-
Save irazasyed/8afff31469a20df907b6 to your computer and use it in GitHub Desktop.
PHP: Check if Laravel version is 4 in Service Provider. To be used in Service Providers.
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 | |
/** | |
* Laravel Version Check | |
* | |
* @return bool | |
*/ | |
private function isLaravel4() | |
{ | |
return version_compare(get_class($this->app) . '::VERSION', '5', '<'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment