Ignore:
Timestamp:
11/23/21 22:01:52 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
master
Children:
dbc5976
Parents:
4d73966
Message:

bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Controllers/Dashboard/FoldersController.php

    r4d73966 r0a1fb54  
    3636
    3737            if ($request->query('sort') == 'newest') {
    38                 $folders = $foldersInDeptSort->orderBy('created_at', 'desc')->paginate(12);
     38                $folders = $foldersInDeptSort->orderBy('created_at', 'desc')->paginate(9);
    3939            }
    4040            else if ($request->query('sort') == 'name') {
    41                 $folders = $foldersInDeptSort->orderBy('name', 'asc')->paginate(12);
     41                $folders = $foldersInDeptSort->orderBy('name', 'asc')->paginate(9);
    4242            }
    4343            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);
    4545            }
    4646            else if($request->query('sort') == 'count'){
    4747                $total = $foldersInDeptSort->folder->files->count();
    48                 $folders = $foldersInDeptSort->orderBy($total, 'asc')->paginate(12);
     48                $folders = $foldersInDeptSort->orderBy($total, 'asc')->paginate(9);
    4949            }
    5050            else {
    51                 $folders = Folder::where('department_id', $request->query('id'))->paginate(12);
     51                $folders = Folder::where('department_id', $request->query('id'))->paginate(9);
    5252            }
    5353        } else {
    5454            if ($request->query('sort') == 'newest') {
    55                 $folders = Folder::orderBy('created_at', 'desc')->paginate(12);
     55                $folders = Folder::orderBy('created_at', 'desc')->paginate(9);
    5656            }
    5757            else if ($request->query('sort') == 'name') {
    58                 $folders = Folder::orderBy('name', 'asc')->paginate(12);
     58                $folders = Folder::orderBy('name', 'asc')->paginate(9);
    5959            }
    6060            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);
    6262            }
    6363            else if ($request->query('sort') == 'recent') {
    64                 $folders = Folder::orderBy('created_at', 'desc')->paginate(12);
     64                $folders = Folder::orderBy('created_at', 'desc')->paginate(9);
    6565            } else if ($request->query('search')) {
    6666
     
    7373                $folders = $result;
    7474            } else {
    75                 $folders = Folder::paginate(12);
     75                $folders = Folder::paginate(9);
    7676            }
    7777        }
Note: See TracChangeset for help on using the changeset viewer.