Completed
Push — master ( 70421f...8ae839 )
by ARCANEDEV
08:37
created

Route   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 36
rs 10
c 0
b 0
f 0
ccs 0
cts 6
cp 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A paths() 0 6 1
1
<?php namespace Arcanedev\LaravelTracker\Models;
2
3
/**
4
 * Class     Route
5
 *
6
 * @package  Arcanesoft\Tracker\Models
7
 * @author   ARCANEDEV <[email protected]>
8
 *
9
 * @property  int             id
10
 * @property  string          name
11
 * @property  string          action
12
 * @property  \Carbon\Carbon  created_at
13
 * @property  \Carbon\Carbon  updated_at
14
 */
15
class Route extends AbstractModel
16
{
17
    /* ------------------------------------------------------------------------------------------------
18
     |  Properties
19
     | ------------------------------------------------------------------------------------------------
20
     */
21
    /**
22
     * The table associated with the model.
23
     *
24
     * @var string
25
     */
26
    protected $table = 'routes';
27
28
    /**
29
     * The attributes that are mass assignable.
30
     *
31
     * @var array
32
     */
33
    protected $fillable = ['name', 'action'];
34
35
    /* ------------------------------------------------------------------------------------------------
36
     |  Relationships
37
     | ------------------------------------------------------------------------------------------------
38
     */
39
    /**
40
     * Paths relationship.
41
     *
42
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
43
     */
44
    public function paths()
45
    {
46
        return $this->hasMany(
47
            $this->getConfig('models.route-path', RoutePath::class)
48
        );
49
    }
50
}
51