I have a form fields in the view as:-
<input type="email" name="user[email]">
<input type="text" name="name">
<input type="text" name="designation">
While submitting this post request, I have a rule defined as:-
app\Http\Requests\StaffEditRequest.php
$rule['user.email'] = 'email|unique:users';
However, when Laravel tries to validate the request it queries the database as if there is a field name user.email in the users table.
How do I customize the field name so that I can tell Laravel that I am looking for email field in the users table and not user.email?