mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-14 12:06:46 +00:00
🚀 initial commit
This commit is contained in:
21
app/Models/Tag.php
Normal file
21
app/Models/Tag.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class Tag extends \Spatie\Tags\Tag
|
||||
{
|
||||
public function courses()
|
||||
{
|
||||
return $this->morphedByMany(Course::class, 'taggable');
|
||||
}
|
||||
|
||||
public function libraryItems()
|
||||
{
|
||||
return $this->morphedByMany(LibraryItem::class, 'taggable');
|
||||
}
|
||||
|
||||
public function episodes()
|
||||
{
|
||||
return $this->morphedByMany(Episode::class, 'taggable');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user