Passed
Push — master ( b69528...d2ddcd )
by Reza
03:53
created

Checkbox   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 8
c 1
b 0
f 1
dl 0
loc 15
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 12 2
1
<?php
2
3
namespace EasyPanel\Parsers\HTMLInputs;
4
5
class Checkbox
6
{
7
8
    public function handle($name)
9
    {
10
        $mode = config('easy_panel.lazy_mode') ? 'wire:model.lazy' : 'wire:model';
11
        $UName = ucfirst($name);
12
        return "
13
            <!-- $UName Input -->
14
            <div class='form-group'>
15
                <div class='form-check mt-4 mb-3'>
16
                    <input $mode='$name' class='form-check-input' type='checkbox' id='input$name'>
17
                    <label class='form-check-label' for='input$name'>{{ __('$UName') }}</label>
18
                </div>
19
                @error('$name') <div class='invalid-feedback'>{{ " . '$message' . " }}</div> @enderror
20
            </div>
21
            ";
22
    }
23
}
24