*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'name' => $this->name, 'slug' => $this->slug, 'description' => $this->description, 'url' => $this->url, 'docs_url' => $this->docs_url, 'logo_url' => $this->logo_url, 'category' => $this->category, 'category_label' => $this->category_label, 'install_command' => $this->install_command, 'config_example' => $this->config_example, 'transport' => $this->transport, 'transport_label' => $this->transport_label, 'language' => $this->language, 'capabilities' => $this->capabilities, 'tags' => $this->tags, 'views' => $this->views, 'clicks' => $this->clicks, 'featured' => $this->featured, 'approved' => $this->approved, 'submitted_by' => new UserResource($this->whenLoaded('user')), 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]; } }