Hi, laravel is not loading the relationship, and I'm not sure why. On all other relationships it doesn't do this on. I have paymentmethod which belongs to a billingaddress, and billingaddress can have many paymentmethods. The tables are named billing_addresses and payment_methods. Here is the query that is being executed:
"query" => "select * from `billing_addresses` where billing_addresses.hospital_id = '3' and `billing_addresses`.`id` is null limit 1"
PaymentMethod:
public function billingAddress ()
{
return $this->belongsTo('App\BillingAddress');
}
BillingAddress:
public function paymentMethods()
{
return $this->hasMany('App\PaymentMethod');
}
Normally I could say: $paymentmethod->billingAddress_id->zipcode and it would bring it up. Hopefully someone can see something I may have overlooked.