Skip to content

Commit

Permalink
Merge pull request #34 from nnnms/master
Browse files Browse the repository at this point in the history
Use more strict SQL syntax to ensure PostgreSQL compatibility
  • Loading branch information
aocneanu authored Nov 26, 2017
2 parents 5d447c5 + bccaedf commit 87df968
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/Http/Controllers/Owner/OwnerTableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class OwnerTableController extends Controller

public function query()
{
return Owner::select(\DB::raw('id as dtRowId, name, description, is_active, created_at'));
return Owner::select(\DB::raw('id as "dtRowId", name, description, is_active, created_at'));
}
}
4 changes: 2 additions & 2 deletions src/app/Http/Controllers/User/UserTableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class UserTableController extends Controller
public function query()
{
return User::select(\DB::raw(
'users.id as dtRowId, owners.name owner, users.first_name, users.last_name, users.phone,
users.email, roles.name role, users.is_active'
'users.id as "dtRowId", owners.name as owner, users.first_name, users.last_name, users.phone,
users.email, roles.name as role, users.is_active'
))->join('owners', 'users.owner_id', '=', 'owners.id')
->join('roles', 'users.role_id', '=', 'roles.id');
}
Expand Down

0 comments on commit 87df968

Please sign in to comment.