I have a question because I don't want to do something wrong.I have a polymorphic relation called votes. Well, I want to save votes but I need to validate if a user already has voted. But even if, in some cases a user can vote multiple times. It depends on the type (as said, polymorphic relation). I've set this data in a config file.Now, where should I validate the votes? I thought I could do it in the model with a static method but then I'd be retrieving the config files in the model and also I'd have to return multiple errors. Something like you have already voted or you can vote again in 1 hour. I'd do that with some kind of error codes which I'd pass to the controller and then to the view to inform the user. But it seems wrong to me.What would be the right way of doing this?
Validate polymorphic votes - Controller or Model?
php;architecture;mvc;laravel