function delete($id_entry, Request $req, $crpt_pass)
 {
     $vld = Validator::make(['id' => $id_entry, 'password' => $req->input('password'), 'crpt' => $crpt_pass], ['id' => 'required|numeric', 'password' => 'required_without:crpt', 'crpt' => 'required_without:password']);
     if ($vld->fails()) {
         if ($req->is('light/*')) {
             if (!empty($crpt_pass)) {
                 return redirect('light')->with('message', 'Lien erroné.');
             }
             return redirect()->back()->with('errors', $vld->messages()->all());
         }
         return response()->json($vld->messages()->all(), 400);
     }
     $id_game = $req->input('id_game');
     $password = empty($crpt_pass) ? $req->input('password') : Crypt::decrypt($crpt_pass);
     if (Entry::delete($id_entry, $password) > 0) {
         if ($req->is('light/*')) {
             return redirect('light')->with('message', 'Entrée supprimée.');
         } else {
             return response()->json("success");
         }
     }
     if ($req->is('light/*')) {
         if (!empty($crpt_pass)) {
             return redirect('light')->with('message', 'Lien erroné.');
         }
         return redirect()->back()->with('errors', ["Mot de passe non valide."]);
     }
     return response()->json(["Mot de passe non valide."], 400);
 }