title: Exception Serialization of 'Closure' is not allowed in Laravel8
body: <p>$data=array('importData'=&gt;$importData,'success'=&gt;'Data Imported Successfully');
  return redirect()-&gt;route('AddJobDetails')-&gt;with( [ 'data' =&gt; $data ] );</p>
  <p>I am just passing the data array to blade file with redirect but it gives me error
  Exception
  Serialization of 'Closure' is not allowed</p>
  <p>What to do solve this issue.</p>