jeudi 4 avril 2019

How to get one record with decrypting

I'm using encrypt script. I can store data one by one as encrypt. And I can get all table data with decrypting using below code.

public function alldata(Request $request)
{
  $data = Contact::all();  
  return view('mail.list', ['data' => $data]);
}

now I have problem. I'm trying to get once recored. but it didn't decrypt. Could someone teach me what is wrong my below code please?

public function onerecord(Request $request)
   {
      $param = ['id' => $request->id];
      $data = DB::select('select * from contacts where id = :id', $param);       
      return view('mail.one', ['data' => $data]);
   }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire