Index: app/Http/Controllers/Dashboard/FoldersController.php
===================================================================
--- app/Http/Controllers/Dashboard/FoldersController.php	(revision bdda09f97ce0daed0b7ac9164d373704bd4b81c8)
+++ app/Http/Controllers/Dashboard/FoldersController.php	(revision 507ade0728433c541fa02eb3e11047124c57cadd)
@@ -276,32 +276,32 @@
     public function downloadfolder(Request $request, $id)
     {
-        try {
             $folder = Folder::find($id);
             $FileSystem = new Filesystem();
-            $zip_file = Storage::disk('uploads')->path('Folder.zip');
-            $zip = new \ZipArchive();
-            $zip->open($zip_file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
-
-            $path = Storage::disk('uploads')->path($folder->department->location . DIRECTORY_SEPARATOR . $folder->name);
-
-            $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path));
-
-            $filesInDoc = $FileSystem->allFiles($path);
-
-            foreach ($files as $file) {
-                if (!$file->isDir()) {
-                    $filePath = $file->getRealPath();
-                    // extracting filename with substr/strlen
-                    $relativePath = substr($filePath, strlen($path) + 1);
-                    $zip->addFile($filePath, $relativePath);
+
+            if($folder->no_of_files > 0) {
+                $zip_file = Storage::disk('uploads')->path('Folder.zip');
+                $zip = new \ZipArchive();
+                $zip->open($zip_file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
+
+                $path = Storage::disk('uploads')->path($folder->department->location . DIRECTORY_SEPARATOR . $folder->name);
+
+                $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path));
+
+                $filesInDoc = $FileSystem->allFiles($path);
+
+                foreach ($files as $file) {
+                    if (!$file->isDir()) {
+                        $filePath = $file->getRealPath();
+                        // extracting filename with substr/strlen
+                        $relativePath = substr($filePath, strlen($path) + 1);
+                        $zip->addFile($filePath, $relativePath);
+                    }
                 }
-            }
-            $zip->close();
-            $headers = array('Content-Type' => 'application/octet-stream',);
-            $zip_new_name = Carbon::now()->format('d.m.Y - H:i') . $folder->name . '.zip';
-            return response()->download($zip_file, $zip_new_name, $headers);
-        }
-        catch (\Exception $e) {
-            //abort(403, "No files found");
+                $zip->close();
+                $headers = array('Content-Type' => 'application/octet-stream',);
+                $zip_new_name = Carbon::now()->format('d.m.Y - H:i') . $folder->name . '.zip';
+                return response()->download($zip_file, $zip_new_name, $headers);
+            }
+        else {
             Alert::flash("This folder has no files", "warning");
             return redirect()->back();
