Skip to content

Commit

Permalink
sorting issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Oct 7, 2023
1 parent 1000a30 commit a2f8f62
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Repositories/Eloquent/PermissionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function list(array $filters = [])
}

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Eloquent/ProfileRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function list(array $filters = [])
}

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Eloquent/RoleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function list(array $filters = [])
}

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Eloquent/TeamRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function list(array $filters = [])
}

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Eloquent/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function list(array $filters = [])
}

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Mongodb/PermissionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function list(array $filters = [])
$query = $this->model->newQuery();

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Mongodb/ProfileRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function list(array $filters = [])
$query = $this->model->newQuery();

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Mongodb/RoleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function list(array $filters = [])
$query = $this->model->newQuery();

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Mongodb/TeamRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function list(array $filters = [])
$query = $this->model->newQuery();

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

//Prepare Output
return (isset($filters['paginate']) && $filters['paginate'] == true)
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Mongodb/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function list(array $filters = [])
$query = $this->model->newQuery();

//Handle Sorting
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['direction'] ?? 'asc');
$query->orderBy($filters['sort'] ?? $this->model->getKeyName(), $filters['dir'] ?? 'asc');

if (isset($filters['login_id']) && ! empty($filters['login_id'])) {
$query->where('login_id', $filters['login_id'])->limit(1);
Expand Down

0 comments on commit a2f8f62

Please sign in to comment.