public static function laravelVersionIs($operator, $version, $laravel = null)
    {
        if (is_null($laravel)) {
            $laravel = app()->version();
        }

        $laravel = strtok($laravel, ' ');

        return version_compare($laravel, $version, $operator);
    }
public static function laravelVersionIs($operator, $version, $laravel = null)
    {
        if (is_null($laravel)) {
            $laravel = app()->version();
        }

        $laravel = strtok($laravel, ' ');

        return version_compare($laravel, $version, $operator);
    }
public static function laravelVersionIs ( $ operator , $ version , $ laravel = null ) { if ( is_null ( $ laravel ) ) { $ laravel = app ( ) -> version ( ) ; } $ laravel = strtok ( $ laravel , ' ' ) ; return version_compare ( $ laravel , $ version , $ operator ) ; }
Compare Laravel 5.x version to the variable given.

@param  double  $version
@return boolean
Compare Laravel 5 . x version to the variable given .