src/Anonym/Constructors/DatabaseConstructor.php
public function register()
    {

        $app = $this->app;

        if (true === $this->app['config']->get('database.autostart')) {

            $configs = Config::get('database');
            $connection = $configs['connection'];
            $connectionConfigs = Arr::get($configs['connections'], $connection, []);

            Query::configs($connectionConfigs);

            $this->singleton(
                'database.base',
                function () {
                    return new Database();
                }
            );

            $this->singleton(Base::class, function () {
                return App::make('database.base');
            });
            

        }
    }
public function register()
    {

        $app = $this->app;

        if (true === $this->app['config']->get('database.autostart')) {

            $configs = Config::get('database');
            $connection = $configs['connection'];
            $connectionConfigs = Arr::get($configs['connections'], $connection, []);

            Query::configs($connectionConfigs);

            $this->singleton(
                'database.base',
                function () {
                    return new Database();
                }
            );

            $this->singleton(Base::class, function () {
                return App::make('database.base');
            });
            

        }
    }
public function register ( ) { $ app = $ this -> app ; if ( true === $ this -> app [ 'config' ] -> get ( 'database.autostart' ) ) { $ configs = Config :: get ( 'database' ) ; $ connection = $ configs [ 'connection' ] ; $ connectionConfigs = Arr :: get ( $ configs [ 'connections' ] , $ connection , [ ] ) ; Query :: configs ( $ connectionConfigs ) ; $ this -> singleton ( 'database.base' , function ( ) { return new Database ( ) ; } ) ; $ this -> singleton ( Base :: class , function ( ) { return App :: make ( 'database.base' ) ; } ) ; } }
register the database base
register the database base