Edit File: FriendProfileResource.php
<?php namespace App\Http\Resources\Api\Friend; use Illuminate\Http\Resources\Json\JsonResource; class FriendProfileResource extends JsonResource { public function toArray($request) { return [ 'id' => $this->id, 'image' => $this->image, 'first_name' => $this->first_name, 'last_name' => $this->last_name, 'full_name' => $this->full_name, 'age' => $this->age, 'gender' => $this->gender, 'gender_text' => $this->gender_text, 'country' => $this->country?->name, 'city' => $this->city?->name, 'num_of_friends' => $this->num_of_friends, 'num_of_likes' => $this->num_of_likes, 'interests' => $this->groupedInterests(), ]; } }
Back to File Manager