Changeset 796e7ac for app/Http/Controllers/Dashboard
- Timestamp:
- 10/25/21 13:59:16 (3 years ago)
- Branches:
- develop, master
- Children:
- 05e57e2
- Parents:
- ff5b46e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/Dashboard/DepartmentsController.php
rff5b46e r796e7ac 127 127 $folders = Folder::where('department_id', $department->id)->get(); 128 128 } 129 if($folders->where('no_of_files' > 0)->count()) { 130 $flag = true; 129 foreach ($folders as $folder){ 130 if($folder->no_of_files > 0){ 131 $flag=true; 131 132 break; 133 } 132 134 } 133 135 } … … 159 161 160 162 else { 161 Alert::flash("All departments are empty", "warning"); 162 return redirect()->back(); 163 } 163 Alert::flash("All departments are empty", "warning"); 164 return redirect()->back(); 165 } 166 164 167 } 165 168 … … 170 173 $flag = false; 171 174 172 if($folders->where('no_of_files' > 0)->count()){ 173 $flag = true; 174 } 175 foreach($folders as $folder){ 176 if($folder->no_of_files > 0) 177 $flag=true; 178 break; 179 } 175 180 176 181 if($flag) {
Note:
See TracChangeset
for help on using the changeset viewer.