fix(file): fixed index response with track_type and orderby
This commit is contained in:
parent
e5b136dec4
commit
ae20567e41
1 changed files with 2 additions and 3 deletions
|
@ -20,14 +20,13 @@ class FileController extends Controller
|
|||
* @return mixed
|
||||
*/
|
||||
public function index(FileFilters $filters) {
|
||||
|
||||
if (!isset($filters->per_page) || is_null($filters)) {
|
||||
$pagination = 20;
|
||||
$pagination = 5;
|
||||
} else {
|
||||
$pagination = $filters->per_page;
|
||||
}
|
||||
|
||||
return File::searchFilter($filters)->cursorPaginate($pagination)->toJson();
|
||||
return File::searchFilter($filters)->with('trackType')->orderBy('artist_name')->paginate($pagination);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue