Laravel 9 – Attempt to read property "nom_prenoms" on null
Advertisements I have two models as follows. Tier Model: public function contact(){ return $this->belongsTo(ContactAdresse::class,"contact_adresse_id"); } ContactAdresse Model: public function tiers(){ return $this->hasMany(Tier::class); } Now I’m trying to retrieve the Tier associated with the Contact using this code: {{ $ContactAdresse->tier->nom_prenoms}} I have the following error. Attempt to read property "nom_prenoms" on null Does anyone have an… Read More Laravel 9 – Attempt to read property "nom_prenoms" on null