protected function setParameters()
	{
		$parameters = [];

		// Set output directory
		$parameters['-o'] = Config::get('spy.output', base_path('database/schema'));

		// Set database connection details
		$connections = Config::get('database.connections', []);
		$connection = ($this->argument('connection')) ?: Config::get('database.default');
		if(isset($connections[$connection]))
		{
			$this->info("Using '$connection' connection");

			$parameters['-host'] = $connections[$connection]['host'];
			$parameters['-db']   = $connections[$connection]['database'];
			$parameters['-u']    = $connections[$connection]['username'];
			$parameters['-p']    = $connections[$connection]['password'];
		}
		else
			$this->comment("Unknown connection '$connection'. Command will fail unless you provide DB credentials.");

		// Merge with user's parameters
		$parameters = array_merge($parameters, Config::get('spy.parameters', []));

		// Ask for missing mandatory parameters
		if( ! isset($parameters['-db']))
			$parameters['-db'] = $this->ask('Enter database name');

		if( ! isset($parameters['-u']))
			$parameters['-u'] = $this->ask('Enter database username');

		return $this->parameters = $parameters;
	}
protected function setParameters()
	{
		$parameters = [];

		// Set output directory
		$parameters['-o'] = Config::get('spy.output', base_path('database/schema'));

		// Set database connection details
		$connections = Config::get('database.connections', []);
		$connection = ($this->argument('connection')) ?: Config::get('database.default');
		if(isset($connections[$connection]))
		{
			$this->info("Using '$connection' connection");

			$parameters['-host'] = $connections[$connection]['host'];
			$parameters['-db']   = $connections[$connection]['database'];
			$parameters['-u']    = $connections[$connection]['username'];
			$parameters['-p']    = $connections[$connection]['password'];
		}
		else
			$this->comment("Unknown connection '$connection'. Command will fail unless you provide DB credentials.");

		// Merge with user's parameters
		$parameters = array_merge($parameters, Config::get('spy.parameters', []));

		// Ask for missing mandatory parameters
		if( ! isset($parameters['-db']))
			$parameters['-db'] = $this->ask('Enter database name');

		if( ! isset($parameters['-u']))
			$parameters['-u'] = $this->ask('Enter database username');

		return $this->parameters = $parameters;
	}
protected function setParameters ( ) { $ parameters = [ ] ; // Set output directory $ parameters [ '-o' ] = Config :: get ( 'spy.output' , base_path ( 'database/schema' ) ) ; // Set database connection details $ connections = Config :: get ( 'database.connections' , [ ] ) ; $ connection = ( $ this -> argument ( 'connection' ) ) ? : Config :: get ( 'database.default' ) ; if ( isset ( $ connections [ $ connection ] ) ) { $ this -> info ( "Using '$connection' connection" ) ; $ parameters [ '-host' ] = $ connections [ $ connection ] [ 'host' ] ; $ parameters [ '-db' ] = $ connections [ $ connection ] [ 'database' ] ; $ parameters [ '-u' ] = $ connections [ $ connection ] [ 'username' ] ; $ parameters [ '-p' ] = $ connections [ $ connection ] [ 'password' ] ; } else $ this -> comment ( "Unknown connection '$connection'. Command will fail unless you provide DB credentials." ) ; // Merge with user's parameters $ parameters = array_merge ( $ parameters , Config :: get ( 'spy.parameters' , [ ] ) ) ; // Ask for missing mandatory parameters if ( ! isset ( $ parameters [ '-db' ] ) ) $ parameters [ '-db' ] = $ this -> ask ( 'Enter database name' ) ; if ( ! isset ( $ parameters [ '-u' ] ) ) $ parameters [ '-u' ] = $ this -> ask ( 'Enter database username' ) ; return $ this -> parameters = $ parameters ; }
Set schemaspy command parameters.

@return array
Set schemaspy command parameters .