Skip to content

Commit

Permalink
Use input and cast columns to array to avoid foreach error.
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra committed Dec 1, 2016
1 parent 095a9e8 commit 269f871
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Engines/QueryBuilderEngine.php
Expand Up @@ -434,7 +434,7 @@ protected function prepareKeyword($keyword)
*/
public function columnSearch()
{
$columns = $this->request->get('columns', []);
$columns = (array) $this->request->input('columns');

foreach ($columns as $index => $column) {
if (! $this->request->isColumnSearchable($index)) {
Expand Down Expand Up @@ -664,8 +664,8 @@ protected function getNullsLastSql($column, $direction)
*/
public function paging()
{
$this->query->skip($this->request['start'])
->take((int) $this->request['length'] > 0 ? $this->request['length'] : 10);
$this->query->skip($this->request->input('start'))
->take((int) $this->request->input('length') > 0 ? $this->request->input('length') : 10);
}

/**
Expand Down

0 comments on commit 269f871

Please sign in to comment.