I am new to Lumen (Laravel). I want to validate if email is already taken by following the Lumen documentation .
$this->validate($request, [
'email' => 'required|unique:borrower|max:255',
//'mobile' => 'required|unique:borrower|max:255'
]);
If I execute the following line in postman, it shows like 422 unprocessed entity.
How can I check if email is already taken through Lumen and show the error message in view? Thanks for all the help!