protected function replaceConnectionName(&$stub, $name)
    {
        $connectionLine = !empty($name) ? sprintf("connection('%s')->", $name) : '';

        return $this->replaceTemplate('connection_name', $connectionLine, $stub);
    }
protected function replaceConnectionName(&$stub, $name)
    {
        $connectionLine = !empty($name) ? sprintf("connection('%s')->", $name) : '';

        return $this->replaceTemplate('connection_name', $connectionLine, $stub);
    }
protected function replaceConnectionName ( & $ stub , $ name ) { $ connectionLine = ! empty ( $ name ) ? sprintf ( "connection('%s')->" , $ name ) : '' ; return $ this -> replaceTemplate ( 'connection_name' , $ connectionLine , $ stub ) ; }
Replaces the connection's name for the given stub.

@param  string  $stub
@param  string  $name

@return $this
Replaces the connection s name for the given stub .