Validation rules - In laravel5.1, do you need to write a request each for add and edit when request verification?
PHP中文网2017-05-16 16:48:43
0
1
430
When adding, it is necessary to verify whether the user name is repeated. When editing, there is no need to verify whether the user name is repeated. How to distinguish and write request verification rules at this time?
Hope it can give you some inspiration
Refer to the official document Forcing A Unique Rule To Ignore A Given ID section