i always get error like this when i use withInput() function in return back() but when i dont use withInput() this error wont appear.
ErrorException in helpers.php line 469: htmlentities() expects parameter 1 to be string, array given
this the validation code
$validation = Validator::make($request->all(), [
'name' => 'required|unique:products',
'category_id' => 'required',
'region' => 'required',
'primary_image'=> 'required'
]);
if($validation->fails()) {
return back()->withInput()
->with('error', 'Please upload the image!');
and for the view, this is the full trace code: https://thepasteb.in/p/pghNcGOzPAqZncN
i want when the validation is fail, it will back with previous input. hope you can give me solution :) thankyou.