Notice: the following article takes into consideration Laravel versions lower than 5.5. After that it is easier to use custom validation rules
Laravel provides different approaches to validate your application’s incoming data.
My favorite method to validate input data in controllers is to create Form Requests: custom request classes that contain authorization and validation logic. They allow you to keep your controllers as clean as possible, because the logic is …Read More