Support the ongoing development of Laravel.io →
Eloquent Views Blade
Last updated 2 years ago.
0

if your mutator name is :

public function getClientNameAttribute() {
 return Client::where('id', $this->client_id)->value('name');
   } 
 }

you could access to its value in blade with this syntax

 {{ $domain->client_name }}

it's seem you've forgot the "underscore" ;) it's work fine for me

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ndev7 ndev7 Joined 19 Nov 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.