Completed
Push — master ( 8a32e8...44da47 )
by Fèvre
21s queued 14s
created

FormServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 56
c 0
b 0
f 0
dl 0
loc 73
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
B boot() 0 66 1
1
<?php
2
namespace Xetaravel\Providers;
3
4
use Collective\Html\FormFacade as Form;
5
use Illuminate\Support\ServiceProvider;
6
7
class FormServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap any application services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        // Collective Form
17
        Form::component('bsText', 'components.form.text', [
18
            'name',
19
            'label' => null,
20
            'value' => null,
21
            'attributes' => [],
22
            'labelClass' => 'form-control-label'
23
        ]);
24
        Form::component('bsEmail', 'components.form.email', [
25
            'name',
26
            'label' => null,
27
            'value' => null,
28
            'attributes' => []
29
        ]);
30
        Form::component('bsNumber', 'components.form.number', [
31
            'name',
32
            'label' => null,
33
            'value' => null,
34
            'attributes' => []
35
        ]);
36
        Form::component('bsTextarea', 'components.form.textarea', [
37
            'name',
38
            'label' => null,
39
            'value' => null,
40
            'attributes' => [],
41
            'labelClass' => 'form-control-label'
42
        ]);
43
        Form::component('bsPassword', 'components.form.password', ['name', 'label' => null, 'attributes' => []]);
44
        Form::component('bsCheckbox', 'components.form.checkbox', [
45
            'name',
46
            'value' => 1,
47
            'checked' => null,
48
            'label' => null,
49
            'attributes' => [],
50
            'labelClass' => 'form-control-label'
51
        ]);
52
        Form::component('bsRadio', 'components.form.radio', [
53
            'name',
54
            'value' => 1,
55
            'checked' => null,
56
            'label' => null,
57
            'attributes' => [],
58
            'labelClass' => 'form-control-label'
59
        ]);
60
        Form::component('bsInputGroup', 'components.form.input-group', [
61
            'name',
62
            'label' => null,
63
            'value' => null,
64
            'attributes' => []
65
        ]);
66
        Form::component('bsSelect', 'components.form.select', [
67
            'name',
68
            'list' => [],
69
            'label' => null,
70
            'selected' => null,
71
            'attributes' => [],
72
            'optionsAttributes' => [],
73
            'labelClass' => 'form-control-label'
74
        ]);
75
        Form::component('bsNewsletter', 'components.form.newsletter', [
76
            'name',
77
            'label' => null,
78
            'value' => null,
79
            'attributes' => []
80
        ]);
81
    }
82
}
83