src/ServiceProvider.php
protected static function bootstrapIlluminateDatabase()
    {
        $config = self::getBitrixDbConfig();

        $capsule = new Capsule(self::instantiateServiceContainer());
        $capsule->addConnection([
            'driver'    => 'mysql',
            'host'      => $config['host'],
            'database'  => $config['database'],
            'username'  => $config['login'],
            'password'  => $config['password'],
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false,
        ]);

        if (class_exists(Dispatcher::class)) {
            $capsule->setEventDispatcher(new Dispatcher());
        }

        $capsule->setAsGlobal();
        $capsule->bootEloquent();

        static::$illuminateDatabaseIsUsed = true;

        return $capsule;
    }
protected static function bootstrapIlluminateDatabase()
    {
        $config = self::getBitrixDbConfig();

        $capsule = new Capsule(self::instantiateServiceContainer());
        $capsule->addConnection([
            'driver'    => 'mysql',
            'host'      => $config['host'],
            'database'  => $config['database'],
            'username'  => $config['login'],
            'password'  => $config['password'],
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false,
        ]);

        if (class_exists(Dispatcher::class)) {
            $capsule->setEventDispatcher(new Dispatcher());
        }

        $capsule->setAsGlobal();
        $capsule->bootEloquent();

        static::$illuminateDatabaseIsUsed = true;

        return $capsule;
    }
protected static function bootstrapIlluminateDatabase ( ) { $ config = self :: getBitrixDbConfig ( ) ; $ capsule = new Capsule ( self :: instantiateServiceContainer ( ) ) ; $ capsule -> addConnection ( [ 'driver' => 'mysql' , 'host' => $ config [ 'host' ] , 'database' => $ config [ 'database' ] , 'username' => $ config [ 'login' ] , 'password' => $ config [ 'password' ] , 'charset' => 'utf8' , 'collation' => 'utf8_unicode_ci' , 'prefix' => '' , 'strict' => false , ] ) ; if ( class_exists ( Dispatcher :: class ) ) { $ capsule -> setEventDispatcher ( new Dispatcher ( ) ) ; } $ capsule -> setAsGlobal ( ) ; $ capsule -> bootEloquent ( ) ; static :: $ illuminateDatabaseIsUsed = true ; return $ capsule ; }
Bootstrap illuminate/database
@return Capsule
Bootstrap illuminate / database