$Projects = Project::with('user')->all();
selectRaw("CONCAT(f_name, f_name) as name")
$projects = Project::with(['user' => function ($query) {
return $query->selectRaw('users.*, CONCAT(users.f_name, users.f_name) as name');
}])->all();
public function getNameAttribute()
{
return $this->attributes['f_name'] . $this->attributes['f_name'];
}
$project->user->name;