*/ public function toArray($request): array { return [ 'firstname' => $this->firstname, 'lastname' => $this->lastname, 'avatar_url' => $this->getGravatarUrl(), 'email' => $this->email, 'id' => $this->id, 'avatar' => [ 'src' => Storage::url('avatar.png'), ], 'links' => [ 'update' => route('user.update', ['user' => $this->getModel()]), ] ]; } public static function meta(): array { return [ 'default' => [ 'firstname' => '', 'lastname' => '', 'email' => '', ], 'links' => [ 'store' => route('user.store'), ] ]; } }