Creating admin request

The command creates app/Http/Requests/CustomerRequest.php. Each method is optional.
app/Http/Requests/CustomerRequest.php
Use it with Customer::validator()->use(CustomerRequest::class) or ->only(CustomerRequest::class). When authorize() returns false, the request is aborted with 401.

rules

rules() is a shortcut for only() + merge(): only listed fields are validated, and their rules are appended to the model rules.