Completed
Push — master ( 58043b...413e7c )
by Sergi Tur
06:39
created

UserMigration::user()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Acacha\Users\Models;
4
5
use App\User;
6
use Illuminate\Database\Eloquent\Model;
7
8
/**
9
 * Class UserMigration.
10
 *
11
 * @package Acacha\Users\Models
12
 */
13
class UserMigration extends Model
14
{
15
    /**
16
     * The attributes that are mass assignable.
17
     *
18
     * @var array
19
     */
20
    protected $fillable = ['source_user_id','source_user','user_id'];
21
22
    /**
23
     * Get the user record associated with the invitation.
24
     */
25
    public function user()
26
    {
27
        return $this->belongsTo(User::class);
28
    }
29
30
    /**
31
     * Get the progress batch that this user migration belongs.
32
     */
33
    public function batch()
34
    {
35
        return $this->belongsTo(UserMigrationBatch::class);
36
    }
37
38
    /**
39
     * Relation to eager loading by default.
40
     *
41
     * @var array
42
     */
43
    public $with = ['user'];
44
}
45
46