1 | <?php |
||
8 | class Photo extends Model |
||
9 | { |
||
10 | use SoftDeletes; |
||
11 | |||
12 | /** |
||
13 | * The table used by this model |
||
14 | * |
||
15 | * @var string |
||
16 | **/ |
||
17 | protected $table = 'photos'; |
||
18 | |||
19 | /** |
||
20 | * The attributes that should be mutated to dates. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $dates = ['deleted_at']; |
||
25 | |||
26 | /** |
||
27 | * When this model is updated, the updated_at timestamp of the album is also changed |
||
28 | * |
||
29 | * @var array |
||
30 | **/ |
||
31 | protected $touches = array('album'); |
||
32 | |||
33 | /** |
||
34 | * Defining the relationship, a photo belongs to an album |
||
35 | * |
||
36 | * @return \JeroenG\LaravelPhotoGallery\Models\Album |
||
37 | **/ |
||
38 | public function album() |
||
42 | |||
43 | } |