mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
createdBy fields added
This commit is contained in:
@@ -26,6 +26,11 @@ class Library extends Model
|
||||
'language_codes' => 'array',
|
||||
];
|
||||
|
||||
public function createdBy(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
}
|
||||
|
||||
public function libraryItems(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(LibraryItem::class);
|
||||
|
||||
Reference in New Issue
Block a user