public function importDatabaseToService($service = null, $import_path = null, $copy_to_service = false, $localhost = false)
    {
        $destination = $this->resolveDatabaseImportDestination(
            $import_path,
            $service,
            $copy_to_service,
            $localhost
        );

        /** @var CommandBuilder $command */
        $command = $this->resolveDatabaseImportCommand()->command("< {$destination}");

        $this->executeEngineCommand($command, $service, [], false, $localhost);

        return $this;
    }
public function importDatabaseToService($service = null, $import_path = null, $copy_to_service = false, $localhost = false)
    {
        $destination = $this->resolveDatabaseImportDestination(
            $import_path,
            $service,
            $copy_to_service,
            $localhost
        );

        /** @var CommandBuilder $command */
        $command = $this->resolveDatabaseImportCommand()->command("< {$destination}");

        $this->executeEngineCommand($command, $service, [], false, $localhost);

        return $this;
    }
public function importDatabaseToService ( $ service = null , $ import_path = null , $ copy_to_service = false , $ localhost = false ) { $ destination = $ this -> resolveDatabaseImportDestination ( $ import_path , $ service , $ copy_to_service , $ localhost ) ; /** @var CommandBuilder $command */ $ command = $ this -> resolveDatabaseImportCommand ( ) -> command ( "< {$destination}" ) ; $ this -> executeEngineCommand ( $ command , $ service , [ ] , false , $ localhost ) ; return $ this ; }
Import database dump into a service.

@param null $service
The database service name to use.
@param null $import_path
The path to the database file.
@param bool $copy_to_service
Copy imported file to service.
@param bool $localhost
Flag to determine if the command should be ran from localhost.

@return $this
@throws \Exception
Import database dump into a service .