Skip to content
Advertisement

Tag: laravel-5.4

Laravel 5.4 required if validation issue

I have 2 fields, accepts_usd and price_usd. For price usd I have a validation rule: And for accepts_usd: When I want to store data if I set accepts_usd to false it still asks for price_usd. whats the issue here? What am I doing wrong? Answer From laravel docs: required_if:anotherfield,value,… The field under validation must be present and not empty if

Remove SoftDeletingScope as global scope

I am trying to remove the SoftDeletingScope as a global scope for a specific user role. So it should somehow look like this: I tried solution 1-3 and, to make sure the method is called at all, 4. I logged the SQL queries and saw that 4 was called, but not the 3 before (to be precise, the methods did

Advertisement