I never experienced this. You may follow this discussion-
Sep 17, 2017
2
Level 1
DecryptException in BaseEncrypter.php line 48: The MAC is invalid. in laravel 5.2
I am getting this error when i sent a post request to my resource controller. My controller code is
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);
}
Sometimes values are coming from request and sometimes(mostly) i am getting the mca error. My frontend is angularjs i am submitting the form using $http service of angularjs.
Please or to participate in this conversation.