fix(file): fixed file index filtering
This commit is contained in:
parent
d41884226d
commit
0e00207fb4
5 changed files with 25 additions and 12 deletions
|
@ -19,14 +19,17 @@ class FileController extends Controller
|
|||
* @param FileFilters $filters
|
||||
* @return mixed
|
||||
*/
|
||||
public function index(FileFilters $filters) {
|
||||
if (!isset($filters->per_page) || is_null($filters)) {
|
||||
public function index(Request $request) {
|
||||
|
||||
if (!isset($request->per_page) || is_null($request)) {
|
||||
$pagination = 5;
|
||||
} else {
|
||||
$pagination = $filters->per_page;
|
||||
$pagination = $request->per_page;
|
||||
}
|
||||
|
||||
return File::searchFilter($filters)->with('trackType')->orderBy('artist_name')->paginate($pagination);
|
||||
$test = File::searchFilter($request);
|
||||
|
||||
return File::searchFilter($request)->with('trackType')->orderBy('artist_name')->paginate($pagination);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue