Passed
Push — master ( 6dc4e1...643de0 )
by Davide
31:15
created

Organizer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 5
c 0
b 0
f 0
dl 0
loc 24
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A user() 0 3 1
1
<?php
2
3
namespace DavideCasiraghi\LaravelEventsCalendar\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Organizer extends Model
8
{
9
    /***************************************************************************/
10
    /**
11
     * The table associated with the model.
12
     *
13
     * @var string
14
     */
15
    protected $table = 'organizers';
16
17
    /***************************************************************************/
18
19
    protected $fillable = [
20
        'name', 'description', 'website', 'created_by', 'slug', 'email', 'phone',
21
    ];
22
    
23
    /***************************************************************************/
24
    
25
    /**
26
     * Get the user that owns the event. eg. $organizer->user
27
     */
28
    public function user()
29
    {
30
        return $this->belongsTo('\Illuminate\Foundation\Auth\User', 'created_by');
31
    }
32
}
33