Using querybuilder and joins with user table not calling accessor and mutator in Laravel

  laravel, query-builder

I am using querybuilder for my query and user table is used with join in other I am not calling model directly like

User::get() method

so it is not calling

public function getFullNameAttribute()
        return "{$this->first_name} {$this->last_name}";

How can I call this method with other model and join used for user model?

Source: Laravel

Leave a Reply