File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ class Toggle extends Component
11
11
public string $ uuid ;
12
12
13
13
public function __construct (
14
+ public ?string $ id = null ,
14
15
public ?string $ label = null ,
15
16
public ?string $ hint = null ,
16
17
public ?bool $ right = false ,
@@ -22,7 +23,7 @@ public function __construct(
22
23
public ?bool $ omitError = false ,
23
24
public ?bool $ firstErrorOnly = false ,
24
25
) {
25
- $ this ->uuid = "mary " . md5 (serialize ($ this ));
26
+ $ this ->uuid = "mary " . md5 (serialize ($ this )) . $ id ;
26
27
}
27
28
28
29
public function modelName (): ?string
@@ -44,7 +45,7 @@ public function render(): View|Closure|string
44
45
@if($right)
45
46
<span @class(["flex-1" => !$tight])>
46
47
{{ $label}}
47
-
48
+
48
49
@if($attributes->get('required'))
49
50
<span class="text-error">*</span>
50
51
@endif
@@ -55,7 +56,7 @@ public function render(): View|Closure|string
55
56
56
57
@if(!$right)
57
58
{{ $label}}
58
-
59
+
59
60
@if($attributes->get('required'))
60
61
<span class="text-error">*</span>
61
62
@endif
You can’t perform that action at this time.
0 commit comments