Changeset ec7b69d for app/Http/Controllers/Dashboard/FoldersController.php
- Timestamp:
- 11/29/21 23:10:44 (3 years ago)
- Branches:
- master
- Children:
- 79aa35c
- Parents:
- dbc5976
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/Dashboard/FoldersController.php
rdbc5976 rec7b69d 233 233 $folder = Folder::find($id); 234 234 235 $existingFolders = Folder::where(['department_id' => $folder->department->id, 'name' => $folder->name, 'arch_id' => $folder->arch_id]) ->count();236 237 if($existingFolders > 1 && $folder->version == 1) {238 Alert::flash($folder->name . " has versions", "error");235 $existingFolders = Folder::where(['department_id' => $folder->department->id, 'name' => $folder->name, 'arch_id' => $folder->arch_id]); 236 237 if($existingFolders->count() > 1 && $folder->version == 1 || $folder->version < $existingFolders->pluck('version')->max()) { 238 Alert::flash($folder->name . " has newer versions", "error"); 239 239 return redirect()->back(); 240 240 }
Note:
See TracChangeset
for help on using the changeset viewer.