Completed
Push — master ( 188ffb...31684b )
by Maxime
02:48
created

ImportForm::buildForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php namespace Distilleries\Expendable\Http\Forms\Import;
2
3
use Distilleries\Expendable\Helpers\StaticLabel;
4
use Distilleries\FormBuilder\FormValidator;
5
6
class ImportForm extends FormValidator {
7
8
    public static $rules = [
9
        'file' => 'required'
10
    ];
11
12
    public static $rules_update = null;
13
14
    // ------------------------------------------------------------------------------------------------
15
16
    public function buildForm()
17
    {
18
19
        $this
20
            ->add('file', 'upload',
21
                [
22
                    'label'      => trans('expendable::form.file_import'),
23
                    'validation' => 'required',
24
                    'extensions' => 'csv,xls,xlsx',
25
                    'view'       => 'files',
26
                ])
27
            ->addDefaultActions();
28
    }
29
}