Completed
Push — master ( 9c55df...f1d822 )
by tac
02:37
created

Author   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 21
rs 10
c 1
b 0
f 0
1
<?php
2
namespace Tacone\Bees\Demo\Models;
3
4
/**
5
 * Author
6
 */
7
class Author extends \Eloquent
8
{
9
    protected $table = 'demo_users';
10
11
    protected $appends = array('fullname');
12
13
    public function articles()
14
    {
15
        return $this->hasMany('\Tacone\Bees\Demo\Models\Article');
16
    }
17
18
    public function comments()
19
    {
20
        return $this->hasMany('\Tacone\Bees\Demo\Models\Comment');
21
    }
22
23
    public function getFullnameAttribute($value)
24
    {
25
        return $this->firstname." ".$this->lastname;
26
    }
27
}
28