*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'titre' => $this->titre, 'theme' => $this->theme, 'questions_count' => $this->whenCounted('questions'), ]; } }