Album::photos()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 4
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
}