Merge two columns into one?

Hi, I'm new using filament and what I need is simple ( I believe ) I just want to display into one column (full name) two columns from model (firstName and lastName) tried with this but didn't work ... any ideas?
No description
Solution:
what i do is create attribute inside my model ```php public function getFullnameAttribute() { return $this->first_name.' '.$this->last_name;...
Jump to solution
5 Replies
ingmontoya
ingmontoyaOP15mo ago
sorry, didn't mention it;s from a relationship
Solution
christmex
christmex15mo ago
what i do is create attribute inside my model
public function getFullnameAttribute()
{
return $this->first_name.' '.$this->last_name;
}
public function getFullnameAttribute()
{
return $this->first_name.' '.$this->last_name;
}
christmex
christmex15mo ago
then inside my resource file, i do this
TextColumn::make('user.fullname')
TextColumn::make('user.fullname')
in case if i have relationshion to user I hope you get the idea
ingmontoya
ingmontoyaOP15mo ago
that's wonderfull !! thank you so much!
Want results from more Discord servers?
Add your server