Model validation with Laravel

Hi,  we are going to discuss about model validation with laravel because by default they provides validation at controller. Also lot of people struct to implement model side validation with laravel. So that today we are going to implement model validation.

For this tutorial i followed some people suggestion and concepts

For model validation, you must construct one parent model and extending it from Eloquent model. For example my parent model is “Model.php”

For validation you should extend this model to your application model. For example i have an model which is “Account.php”

Whenever fire “save()” then it validate the data and return errors.

For example my “Account_Controller.php

I hope it is quite useful and don’t forgot to share and subscribe for my updates.