Validation rules - In laravel5.1, do you need to write a request each for add and edit when request verification?
PHP中文网
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?

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
phpcn_u1582

Hope it can give you some inspiration

Refer to the official document Forcing A Unique Rule To Ignore A Given ID section

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template