Changeset 0a1fb54 for app/Http/Controllers/Dashboard/FoldersController.php
- Timestamp:
- 11/23/21 22:01:52 (3 years ago)
- Branches:
- master
- Children:
- dbc5976
- Parents:
- 4d73966
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/Dashboard/FoldersController.php
r4d73966 r0a1fb54 36 36 37 37 if ($request->query('sort') == 'newest') { 38 $folders = $foldersInDeptSort->orderBy('created_at', 'desc')->paginate( 12);38 $folders = $foldersInDeptSort->orderBy('created_at', 'desc')->paginate(9); 39 39 } 40 40 else if ($request->query('sort') == 'name') { 41 $folders = $foldersInDeptSort->orderBy('name', 'asc')->paginate( 12);41 $folders = $foldersInDeptSort->orderBy('name', 'asc')->paginate(9); 42 42 } 43 43 else if ($request->query('sort') == 'no_of_files') { 44 $folders = $foldersInDeptSort->orderBy('no_of_files', 'desc')->paginate( 12);44 $folders = $foldersInDeptSort->orderBy('no_of_files', 'desc')->paginate(9); 45 45 } 46 46 else if($request->query('sort') == 'count'){ 47 47 $total = $foldersInDeptSort->folder->files->count(); 48 $folders = $foldersInDeptSort->orderBy($total, 'asc')->paginate( 12);48 $folders = $foldersInDeptSort->orderBy($total, 'asc')->paginate(9); 49 49 } 50 50 else { 51 $folders = Folder::where('department_id', $request->query('id'))->paginate( 12);51 $folders = Folder::where('department_id', $request->query('id'))->paginate(9); 52 52 } 53 53 } else { 54 54 if ($request->query('sort') == 'newest') { 55 $folders = Folder::orderBy('created_at', 'desc')->paginate( 12);55 $folders = Folder::orderBy('created_at', 'desc')->paginate(9); 56 56 } 57 57 else if ($request->query('sort') == 'name') { 58 $folders = Folder::orderBy('name', 'asc')->paginate( 12);58 $folders = Folder::orderBy('name', 'asc')->paginate(9); 59 59 } 60 60 else if ($request->query('sort') == 'no_of_files') { 61 $folders = Folder::orderBy('no_of_files', 'desc')->paginate( 12);61 $folders = Folder::orderBy('no_of_files', 'desc')->paginate(9); 62 62 } 63 63 else if ($request->query('sort') == 'recent') { 64 $folders = Folder::orderBy('created_at', 'desc')->paginate( 12);64 $folders = Folder::orderBy('created_at', 'desc')->paginate(9); 65 65 } else if ($request->query('search')) { 66 66 … … 73 73 $folders = $result; 74 74 } else { 75 $folders = Folder::paginate( 12);75 $folders = Folder::paginate(9); 76 76 } 77 77 }
Note:
See TracChangeset
for help on using the changeset viewer.