Skip to content

Commit

Permalink
feat: set created as default sort value to users controller index
Browse files Browse the repository at this point in the history
  • Loading branch information
phojie committed Nov 17, 2022
1 parent 1ef8770 commit d9c5d2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public function index(Request $request)

// set query builder
$query = QueryBuilder::for($model)
->defaultSort('created_at')
->allowedSorts(['full_name', 'status']);

// ->allowedFilters(['username', 'email', 'full_name']);

// if request search
Expand Down

0 comments on commit d9c5d2c

Please sign in to comment.