Album   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 10
Bugs 0 Features 1
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 29
rs 10
c 10
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A photos() 0 4 1
1
<?php
2
3
namespace JeroenG\LaravelPhotoGallery\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class Album extends Model
9
{
10
    use SoftDeletes;
11
12
    /**
13
     * The table used by this model
14
     *
15
     * @var string
16
     **/
17
    protected $table = 'albums';
18
19
    /**
20
     * The attributes that should be mutated to dates.
21
     *
22
     * @var array
23
     */
24
    protected $dates = ['deleted_at'];
25
26
    /**
27
     * Defining the relationship, an album could have many photos
28
     *
29
     * @return \JeroenG\LaravelPhotoGallery\Models\Photo
30
     **/
31
    public function photos()
32
    {
33
    	return $this->hasMany('\JeroenG\LaravelPhotoGallery\Models\Photo');
34
    }
35
36
}