Ekapp/skolehjem/app/Album.php

28 lines
409 B
PHP
Raw Normal View History

2020-06-30 06:48:51 +00:00
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Album extends Model
{
2020-06-30 07:19:35 +00:00
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');
}
2020-06-30 06:48:51 +00:00
}