Skip to content

Tag: laravel-5

Laravel HasMany across multiple connections

I want to retrieve Offers related to Offer on a second table offer_related because I can’t change the schema of the Offer table. I have two databases on different connections, offers on one, and offer_related on another. For the sake of argument, I’m going to name databases as follows for clarity …

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 …

How to get All data from a model except one?

I want to retrieve all users data except one.for that i used the following query When i dd() the output I see all the users data except the one But when I send the query results in foreach() loop in view page I see Trying to get property of non-object Error in view page.What’s the Error here? Can anyone…