FormFieldCondition::formField()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace MedianetDev\BackpackForm\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Backpack\CRUD\app\Models\Traits\CrudTrait;
7
use Illuminate\Support\Facades\App;
8
9
class FormFieldCondition extends Model
10
{
11
    use CrudTrait;
0 ignored issues
show
introduced by
The trait Backpack\CRUD\app\Models\Traits\CrudTrait requires some properties which are not provided by MedianetDev\BackpackForm\Models\FormFieldCondition: $fakeColumns, $identifiableAttribute, $Type
Loading history...
12
13
    /*
14
    |--------------------------------------------------------------------------
15
    | GLOBAL VARIABLES
16
    |--------------------------------------------------------------------------
17
    */
18
    protected $table = 'med_form_field_conditions';
19
    protected $guarded = ['id'];
20
21
    /**
22
     * The attributes that are mass assignable.
23
     *
24
     * @var array
25
     */
26
    protected $fillable = [
27
        'operation',
28
        'form_field_id',
29
        'form_step_id',
30
        'when',
31
        'eq',
32
        'show',
33
    ];
34
35
    /*
36
    |--------------------------------------------------------------------------
37
    | FUNCTIONS
38
    |--------------------------------------------------------------------------
39
    */
40
41
42
    /*
43
    |--------------------------------------------------------------------------
44
    | RELATIONS
45
    |--------------------------------------------------------------------------
46
    */
47
48
    /**
49
     * Get the form field that owns the translation
50
     */
51
    public function formField()
52
    {
53
        return $this->belongsTo(FormField::class, 'form_field_id');
54
    }
55
56
    /*
57
    |--------------------------------------------------------------------------
58
    | SCOPES
59
    |--------------------------------------------------------------------------
60
    */
61
62
63
    /*
64
    |--------------------------------------------------------------------------
65
    | ACCESSORS
66
    |--------------------------------------------------------------------------
67
    */
68
69
    /*
70
    |--------------------------------------------------------------------------
71
    | MUTATORS
72
    |--------------------------------------------------------------------------
73
    */
74
}
75