Skip to content

Commit

Permalink
Accomodate connection prefixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylornotwell committed May 18, 2018
1 parent 7fde2d3 commit 241f65e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/LaramanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function index(Request $request)

// search sorted results
if (!$request->has('sort') && count($ids) > 0) {
$builder->orderByRaw(DB::raw('FIELD(' . $builder->getModel()->getTable() . '.id, ' . implode(', ', $ids)) . ') asc');
$builder->orderByRaw(DB::raw('FIELD(' . $builder->getConnection()->getTablePrefix() . $builder->getModel()->getTable() . '.id, ' . implode(', ', $ids)) . ') asc');

$sort = null;
}
Expand Down

0 comments on commit 241f65e

Please sign in to comment.