Support the ongoing development of Laravel.io →
Input Eloquent Validation
Last updated 2 years ago.
0

If you like the idea then search for Ardent and/or Magniloquent packages. They take this idea much further.

Last updated 2 years ago.
0

Creating a single instance of a class is never a big deal.

Last updated 2 years ago.
0

you could make the rules property and the validation method static, and just call it directly that way.

Last updated 2 years ago.
0

I use this version: https://tutsplus.com/lesson/validation-services/

You are gonna repeat the code for every model you want to validate with your version :)

I know it's nice to store rules in model ... but dont repeat code if you can find a better way :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

websanova websanova Joined 8 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.