Completed
Push — manage-articles ( 1fa998...1c60ef )
by Fèvre
02:30
created

FormServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 47
Code Lines 38

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 47
rs 9.0303
c 1
b 0
f 0
cc 1
eloc 38
nc 1
nop 0
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('bsTextarea', 'components.form.textarea', [
31
            'name',
32
            'label' => null,
33
            'value' => null,
34
            'attributes' => [],
35
            'labelClass' => 'form-control-label'
36
        ]);
37
        Form::component('bsPassword', 'components.form.password', ['name', 'label' => null, 'attributes' => []]);
38
        Form::component('bsCheckbox', 'components.form.checkbox', [
39
            'name',
40
            'value' => 1,
41
            'checked' => null,
42
            'label' => null,
43
            'attributes' => [],
44
            'labelClass' => 'form-control-label'
45
        ]);
46
        Form::component('bsInputGroup', 'components.form.input-group', [
47
            'name',
48
            'label' => null,
49
            'value' => null,
50
            'attributes' => []
51
        ]);
52
        Form::component('bsSelect', 'components.form.select', [
53
            'name',
54
            'list' => [],
55
            'label' => null,
56
            'selected' => null,
57
            'attributes' => [],
58
            'labelClass' => 'form-control-label'
59
        ]);
60
    }
61
}
62