Level 51
in the forum, three backticks to open code and three again to close
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi I want laravel query that hide appends attribute? my model like below
protected $appends = ['name'];
public function getNameAttribute(){
return $this->first_name . ' ' . $this->last_name;
}
$user = user::get();
this above query gets appends name attribute. is that any query to exclude name appends attribute?
and Thanks for answering...
You can do that :
$users = User::get()->makeHidden('name');
Please or to participate in this conversation.