I think its a simple question to answer for you guys. I just want to redirect to the given page when serialnumber has an error but it tells me that $errors is undefined so i thought i have to add something like this:
use Illuminate\Http\Request;
but i coulndt find something like that what did i miss can anyone help me? :)
if ($errors->has('serialnumber')){
return redirect()->route('borrow.index')
->with('warning','Test');
}
EDIT:
I would like that with no matter what error you get rejected with a message on the page I have specified. With a single message that I define myself. The link in the comments wont help me out......