Skip to content

QueryBuilder Result in Array format PDO::FETCH_ASSOC #79

@najicham

Description

@najicham

First, thank you so much for making this package, it is amazing!

It would be great to get query builder results as an associative array.

I see in vendor/illuminate/database/Connection.php:
line 102:
protected $fetchMode = PDO::FETCH_OBJ;

in file vendor/illuminate/database/Capsule/Manager.php:
line 47:
protected function setupDefaultConfiguration()
{
$this->container['config']['database.fetch'] = PDO::FETCH_OBJ;
$this->container['config']['database.default'] = 'default';
}

Is there currently an easy way to update the Illuminate container config? What do you recommend is the best way to set the database.fetch = PDO::FETCH_ASSOC?

thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions