Terminate method in middleware in laravel

I wanted to define a case if a function return false in a terminate() method in laravel middleware so this is what I did

    $parsedData = $this->parse($request);
if(!$parsedData){
dd("hello");
}

the condition is running fine but when I am calling response it is not showing anything

$parsedData = $this->parse($request);
if(!$parsedData){
return Response::json(array(
'success' => false,
'info' => "error"
), 422);
}
\\ called the Response helper

am I doing anything wrong in this case?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3AgwZFF
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

5 Free Black and White Social Media Icons Sets with CSS and HTML

How to Create Treeview with Bootstrap and jQuery

How to Change Apache and MySQL Port Number in XAMPP Localhost