Parcourir la source

Merge branch '20250522_diywebfr'

15313670163 il y a 1 jour
Parent
commit
c0419416a4
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      app/JsonRpc/PublicRpcService.php

+ 5 - 1
app/JsonRpc/PublicRpcService.php

@@ -2121,7 +2121,11 @@ class PublicRpcService implements PublicRpcServiceInterface
      */
     public function getComponentType(array $data): array
     {
-        $component_type = ComponentType::get()->all();
+        $where = [];
+        if(isset($data['id']) && !empty($data['id'])){
+            $where['id'] = $data['id'];
+        }
+        $component_type = ComponentType::where($where)->get()->all();
         $article = Article::first()->toArray();
         $category = WebsiteCategory::first()->toArray();
         $footer_category = FooterCategory::first()->toArray();