LaVOZs

The World’s Largest Online Community for Developers

'; laravel - Reach a value of an object - LavOzs.Com

I have this object :

Part 1 of the object :

https://www.dropbox.com/s/p5v9j3hj0yrqy0q/Capture%20d%27%C3%A9cran%202020-05-22%2017.15.01.png?dl=0

Part 2 of the object :

https://www.dropbox.com/s/s544edbkjo34lc0/Capture%20d%27%C3%A9cran%202020-05-22%2017.15.13.png?dl=0

I would like to get the value inside de border (see link Part 2 of the object).

My code :

It's a many to many, I have 2 models :

Model Hinteraction :

public function effects() {
        //DD: une hinteraction peut avoir plusieurs effets et un effet peut se trouver dans plusieurs hinteractions 
        return $this->belongsToMany(Effect::class, 'hinteraction_has_effects'); 
    }

Model Effect :

class Effect extends Model
{
    //DD: une hinteraction peut avoir plusieurs effets et un effet peut se trouver dans plusieurs hinteractions
    public function hinteractions() 
{ 
        return $this->belongsToMany(Hinteraction::class, 'hinteraction_has_effects'); 
}
            $hinteractions_has_effects = Hinteraction::with('effects')->get();

I tried to make this :

@foreach ($hinteractions_has_effects as $effect)
    {{$effect->name}}   

But I don't have no name.

Thank you in advance for your help. @endforeach

Related
Laravel many-to-many relationships
Laravel - global navigation
How to change value of a request parameter in laravel
Laravel 5: How to use firstOrNew with additional relationship fields
When i m Send Ajax Request in my web Application then controller side it give me script in request parameter in laravel
Get results from pivot table based on the combination of two IDs in Laravel Project
Laravel & MySQL join a table with polymorphic association
Having a problem with a pivot table on Laravel
Reaching a controller in multiple folders