src/Migration.php
protected function connect() : void
    {
        if (! $this->isLaravel()) {
            throw new Exception('This migrator must be ran from inside a Laravel application.');
        }

        $this->manager = app('db');
        $this->database = $this->manager->connection();
        $this->schema = $this->database->getSchemaBuilder();
    }
protected function connect() : void
    {
        if (! $this->isLaravel()) {
            throw new Exception('This migrator must be ran from inside a Laravel application.');
        }

        $this->manager = app('db');
        $this->database = $this->manager->connection();
        $this->schema = $this->database->getSchemaBuilder();
    }
protected function connect ( ) : void { if ( ! $ this -> isLaravel ( ) ) { throw new Exception ( 'This migrator must be ran from inside a Laravel application.' ) ; } $ this -> manager = app ( 'db' ) ; $ this -> database = $ this -> manager -> connection ( ) ; $ this -> schema = $ this -> database -> getSchemaBuilder ( ) ; }
Check the database connection and use of the Laravel framework.

@return void
@throws \Exception
Check the database connection and use of the Laravel framework .