Ekapp/skolehjem/app/Album.php

28 lines
409 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Album extends Model
{
protected $fillable = [
'name'
];
public function parentAlbum()
{
return $this->belongsTo('App\Album');
}
public function images()
{
return $this->hasMany('App\Image');
}
public function videos()
{
return $this->hasMany('App\Video');
}
}