theriddleofenigma/laravel-model-validation

some function to bypass validation

Opened this issue · 2 comments

vheins commented

Is your feature request related to a problem? Please describe.
I need to define validation rule on every model but some time i need to by pass that

Describe the solution you'd like
Maybe you can add some chaining function to skip validation and use like this

//this is current usage with validation rule enabled
MyModel::create(['name'=>'jhon doe');

//code if validation ignored / skip
MyModel::skipValidation()->create(['name'=>'jhon doe');

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
i try to make pull request but my knowledge its limited caus its using boot() on model i dont know to parsing variable to boot() method

Thanks for raising @vheins. It would be a good addition to the package if possible. I will have a look.

vheins commented

thank you @theriddleofenigma hope you can help this