diff --git a/README.md b/README.md index e8192a5..84ebbc7 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Add the laravel-db2 Service Provider to your config in ``app/config/app.php``: There are two ways to configure laravel-db2. You can choose the most convenient way for you. You can put your DB2 credentials into ``app/config/database.php`` (option 1) file or use package config file which you can be generated through command line by artisan (option 2). -#### Option 1: Configure DB2 using ``app/config/database.php`` file +#### Option 1: Configure DB2 using ``app/config/database.php`` file Simply add this code at the end of your ``app/config/database.php`` file: diff --git a/src/Query/Grammars/DB2Grammar.php b/src/Query/Grammars/DB2Grammar.php index 159c7da..752c806 100644 --- a/src/Query/Grammars/DB2Grammar.php +++ b/src/Query/Grammars/DB2Grammar.php @@ -50,6 +50,10 @@ class DB2Grammar extends Grammar */ public function compileSelect(Builder $query) { + if (is_null($query->columns)) { + $query->columns = array('*'); + } + $components = $this->compileComponents($query); // If an offset is present on the query, we will need to wrap the query in