Completed
Push — master ( f2f6fa...1beb9c )
by claudio
03:43
created

Company::employees()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace plunner;
4
5
use Illuminate\Auth\Authenticatable;
6
use Illuminate\Auth\Passwords\CanResetPassword;
7
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
8
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
9
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
10
use Illuminate\Database\Eloquent\Model;
11
use Illuminate\Database\Eloquent\SoftDeletes;
12
use Illuminate\Foundation\Auth\Access\Authorizable;
13
14
/**
15
 * plunner\Company
16
 *
17
 * @property integer $id
18
 * @property string $name
19
 * @property string $email
20
 * @property string $password
21
 * @property string $remember_token
22
 * @property \Carbon\Carbon $created_at
23
 * @property \Carbon\Carbon $updated_at
24
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company whereId($value)
25
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company whereName($value)
26
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company whereEmail($value)
27
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company wherePassword($value)
28
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company whereRememberToken($value)
29
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company whereCreatedAt($value)
30
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company whereUpdatedAt($value)
31
 * @property string $deleted_at
32
 * @property boolean $verified
33
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company whereDeletedAt($value)
34
 * @method static \Illuminate\Database\Query\Builder|\plunner\Company whereVerified($value)
35
 * @property-read \Illuminate\Database\Eloquent\Collection|\plunner\Employee[] $employees
36
 */
37
class Company extends Model implements AuthenticatableContract,
38
                                    AuthorizableContract,
39
                                    CanResetPasswordContract
40
{
41
    use Authenticatable, Authorizable, CanResetPassword;
42
43
    /**
44
     * The database table used by the model.
45
     *
46
     * @var string
47
     */
48
    //protected $table = 'users';
49
50
    /**
51
     * The attributes that are mass assignable.
52
     *
53
     * @var array
54
     */
55
    protected $fillable = ['name', 'email', 'password'];
56
57
    /**
58
     * The attributes excluded from the model's JSON form.
59
     *
60
     * @var array
61
     */
62
    protected $hidden = ['password', 'remember_token'];
63
64 6
    public function employees()
65
    {
66 6
        return $this->hasMany('plunner\Employee');
67
    }
68
}
69