public function getDetails($id)
 {
     $entry = FileRecord::withTrashed()->where('id', '=', $id)->firstOrFail();
     if ($entry->doc_type_id == 1) {
         return view('nav.cards.fileInfo')->with('file', $entry);
     } else {
         $achievement = Achievements::withTrashed()->where('achievement_id', '=', $id)->firstOrFail();
         return view('nav.cards.fileInfo')->with('file', $entry)->with('achievement', $achievement);
     }
 }
 public function restore($id)
 {
     $achievement = Achievements::withTrashed()->where('achievement_id', '=', $id)->firstOrFail();
     $file = FileRecord::withTrashed()->where('id', '=', $id)->firstOrFail();
     $achievement->restore();
     $file->restore();
     $achievement->delete_pending = false;
     $achievement->delete_details = "";
     $achievement->save();
     return redirect('/admin/deleted');
 }