Changeset 28bab7b for app/Http/Controllers
- Timestamp:
- 11/03/21 12:39:35 (3 years ago)
- Branches:
- master
- Children:
- e3af09e
- Parents:
- 3536fe9
- Location:
- app/Http/Controllers/Dashboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/Dashboard/DepartmentsController.php
r3536fe9 r28bab7b 163 163 164 164 else { 165 Alert::flash("All departments are empty", "warning");165 Alert::flash("All folders are empty", "warning"); 166 166 return redirect()->back(); 167 167 } -
app/Http/Controllers/Dashboard/FoldersController.php
r3536fe9 r28bab7b 119 119 $existingFolder = Folder::where(['department_id' => $request->department, 'name' => $request->name, 'arch_id' => $request->arch_id])->count(); 120 120 121 $existingFolderName = Folder::where(['department_id' => $request->department, 'name' => $request->name])-> count();122 $existingFolderArchId = Folder::where(['department_id' => $request->department, 'arch_id' => $request->arch_id])-> count();121 $existingFolderName = Folder::where(['department_id' => $request->department, 'name' => $request->name])->get(); 122 $existingFolderArchId = Folder::where(['department_id' => $request->department, 'arch_id' => $request->arch_id])->get(); 123 123 124 124 if($existingFolder > 0) { … … 126 126 } 127 127 128 if(($existingFolderName > 0 && $existingFolderArchId <= 0) || ($existingFolderName <= 0 && $existingFolderArchId > 0)) { 128 //dd($existingFolderName, $existingFolderArchId); 129 130 if(($existingFolderName->isNotEmpty() && $existingFolderArchId->isEmpty()) || ($existingFolderName->isEmpty() && $existingFolderArchId->isNotEmpty())) { 129 131 Alert::flash("Can't create another version since folder name or archive ID is different", "error"); 130 132
Note:
See TracChangeset
for help on using the changeset viewer.