class User extends Eloquent { public function getFullNameAttribute() { return $this->first_name.' '.$this->last_name; } }
$user = User::find(1); $user->full_name;