Inquries table contains client\_id as a foreign key, I want to Access ist Name in my view.
The clients table has a name column.

I tried following to Show the Name in my view but it did not work.

```
@foreach($inquiries as $inquiryKey => $inquiryValue)
    <td>{{ $inquiryValue->client_id }}</td> // works
    <td>{{ $inquiryValue->client_id->name }}</td> // does not work
@endforeach

```

Client Model

```
public function inquiry()
{
    return $this->hasMany(Inquiry::class);
}

```

Inquiry

```
public function client()
{
    return $this->belongsTo(Client::class);
}

```