Task   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A user() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Task extends Model
8
{
9
    /**
10
     * The attributes that are mass assignable.
11
     *
12
     * @var array
13
     */
14
    protected $fillable = [
15
        'user_id',
16
        'name',
17
        'description',
18
        'completed',
19
    ];
20
21
    /**
22
     * Bind the Task to a User.
23
     */
24
    public function user()
25
    {
26
        return $this->belongsTo('App\Models\User');
27
    }
28
}
29