public function version() {
        $app = $this->app;
        if (defined(get_class($app).'::VERSION')) {
            return intval($app::VERSION);
        }

        if (is_callable([$app, 'version'])) {
            preg_match('/(\((\d+\.\d+\.\d+)\))/', $app->version(), $v);
            if (isset($v[2])) {
                return -intval($v[2]);
            }
        }

        return null;
    }
public function version() {
        $app = $this->app;
        if (defined(get_class($app).'::VERSION')) {
            return intval($app::VERSION);
        }

        if (is_callable([$app, 'version'])) {
            preg_match('/(\((\d+\.\d+\.\d+)\))/', $app->version(), $v);
            if (isset($v[2])) {
                return -intval($v[2]);
            }
        }

        return null;
    }
public function version ( ) { $ app = $ this -> app ; if ( defined ( get_class ( $ app ) . '::VERSION' ) ) { return intval ( $ app :: VERSION ) ; } if ( is_callable ( [ $ app , 'version' ] ) ) { preg_match ( '/(\((\d+\.\d+\.\d+)\))/' , $ app -> version ( ) , $ v ) ; if ( isset ( $ v [ 2 ] ) ) { return - intval ( $ v [ 2 ] ) ; } } return null ; }
Get the major Laravel version number

@return integer
Get the major Laravel version number