@@ -54,7 +54,7 @@ |
||
| 54 | 54 | if($type === 'textarea'){ |
| 55 | 55 | $html = ''; |
| 56 | 56 | $html .= '<textarea data-configuration_id="'.$field->id .'" class="form-control mongiconfigurationfield"></textarea>'; |
| 57 | - }else{ |
|
| 57 | + } else{ |
|
| 58 | 58 | $html .= '<input type="'.$type.'" data-configuration_id="'.$field->id .'" class="form-control mongiconfigurationfield">'; |
| 59 | 59 | } |
| 60 | 60 | return $html; |
@@ -46,12 +46,12 @@ |
||
| 46 | 46 | public static function getProducts($id = null){ |
| 47 | 47 | if($id === null){ |
| 48 | 48 | $products = Product::all(); |
| 49 | - }else{ |
|
| 49 | + } else{ |
|
| 50 | 50 | if(Category::find($id)){ |
| 51 | 51 | $belong_to_this_category = Category::find($id)->children->pluck('id')->toArray(); |
| 52 | 52 | $result = array_merge($belong_to_this_category, [0 =>$id]); |
| 53 | 53 | $products = Product::whereIn('category_id',$result)->get(); |
| 54 | - }else{ |
|
| 54 | + } else{ |
|
| 55 | 55 | $products = []; |
| 56 | 56 | } |
| 57 | 57 | } |