Completed
Push — master ( 77fa1d...4c135b )
by ARCANEDEV
08:34
created

Query::arguments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
ccs 4
cts 4
cp 1
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php namespace Arcanedev\LaravelTracker\Models;
2
3
/**
4
 * Class     Query
5
 *
6
 * @package  Arcanedev\LaravelTracker\Models
7
 * @author   ARCANEDEV <[email protected]>
8
 *
9
 * @property  int             id
10
 * @property  string          query
11
 * @property  \Carbon\Carbon  created_at
12
 * @property  \Carbon\Carbon  updated_at
13
 */
14
class Query extends Model
15
{
16
    /* ------------------------------------------------------------------------------------------------
17
     |  Properties
18
     | ------------------------------------------------------------------------------------------------
19
     */
20
    /**
21
     * The table associated with the model.
22
     *
23
     * @var string
24
     */
25
    protected $table = 'queries';
26
27
    /**
28
     * The attributes that are mass assignable.
29
     *
30
     * @var array
31
     */
32
    protected $fillable = ['query'];
33
34
    /* ------------------------------------------------------------------------------------------------
35
     |  Relationships
36
     | ------------------------------------------------------------------------------------------------
37
     */
38
    /**
39
     * The arguments relationship.
40
     *
41
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
42
     */
43 6
    public function arguments()
44
    {
45 6
        return $this->hasMany(
46 6
            $this->getConfig('models.query-argument', QueryArgument::class)
47 3
        );
48
    }
49
}
50