リソースコントローラに投稿要求を送信したときにこのエラーが発生します。私のコントローラのコードは時々値が、私はMACのエラーを取得しています(主に)時々BaseEncrypter.php行のDecryptException 48:MACが無効です。 in laravel 5.2
public function store(Request $request)
{
//return $request->all(); (here i am checking values sometimes showing values and sometimes showing the mac error.)
$tags = $request->input('tags');
if(!empty($tags)){
$tags = implode(",", $tags);
}
//return $request->from;
$status = FamousPost::create([
'name' => $request->input('from'),
'to_name' => $request->input('to'),
'title' => $request->input('title'),
'content' => $request->input('content'),
'avatar' => $request->input('from_avatar'),
'to_avatar' => $request->input('to_avatar'),
'tags' => $tags
]);
if($status)
return json_encode(true);
else
return json_encode(false);
}
要求から来ていますさ。私のフロントエンドはangularjsです。$http service
のangularjsを使用してフォームを送信しています。
をこのフィールドを追加 – prudhvi259