0
Eloquentでレコードを取得しようとしています。問題があります。Laravel:暗号化されたデータループを照会するとDecryptExceptionが発生する
Model::where('condiction', '=', $value)
はデータが暗号化されているため回答ではありません。
だから私はそうのようにそれを行うもののました:チェック
$whatever = '123';
Model::all()->filter(function($record) use ($whatever) {
if ($record->whatever) {
if (Crypt::decrypt($record->whatever) == $whatever) {
die(dump($record)); //just for test purpose. change to return after problem's resolved
}
}
});
がありますならば、すべての行を取得し、それらを解読し、行を返すと、ここで問題が来ます。私は私がそれゆえコードは大丈夫のようです。この問題を解決する方法の見当もつかない
Illuminate \ Contracts \ Encryption \ DecryptException
The payload is invalid.
言って復号化例外を得続けます。