'datetime', ]; protected $appends = ['full_name']; public function getFullNameAttribute() { return $this->first_name . ' ' . $this->last_name; } public function userProfile() { return $this->hasOne(UserProfile::class, 'user_id', 'id'); } }