src/Database/Migration/Schema.php
/**
	 * Executes the given callable with the default connection set to the given connection name.
	 *
	 * @param string $connectionName
	 * @param callable $callable
	 * @return void
	 */
Executes the given callable with the default connection set to the given connection name.
@param string $connectionName
@param callable $callable
@return void
Executes the given callable with the default connection set to the given connection name . @param string $connectionName @param callable $callable @return void
public static function withDefaultConnection($connectionName, $callable) {
		$previous = static::$connection;
		static::$connection = static::connection($connectionName);
		try {
			$callable();
		}
		catch (Exception $ex) {
			static::$connection = $previous;
			throw $ex;
		}
		static::$connection = $previous;
	}
public static function withDefaultConnection ( $ connectionName , $ callable ) { $ previous = static :: $ connection ; static :: $ connection = static :: connection ( $ connectionName ) ; try { $ callable ( ) ; } catch ( Exception $ ex ) { static :: $ connection = $ previous ; throw $ ex ; } static :: $ connection = $ previous ; }
Executes the given callable with the default connection set to the given connection name.
Executes the given callable with the default connection set to the given connection name .