Completed
Push — master ( 5f680c...7bfca2 )
by Sergi Tur
02:12
created

Event::user()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Acacha\Events\Models;
4
5
use App\User;
6
use Illuminate\Database\Eloquent\Model;
7
8
/**
9
 * Class Event.
10
 *
11
 * @package Acacha\Events\Models
12
 */
13
class Event extends Model
14
{
15
    protected $fillable = ['name','description','user_id'];
16
17
    /**
18
     * Get the user that belongs the event.
19
     *
20
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
21
     */
22
    protected function user() {
23
        return $this->belongsTo(User::class);
24
    }
25
}
26