|
@@ -66,6 +66,11 @@ class File extends Model
|
|
|
return $this->belongsTo(Container::class, 'object_id');
|
|
|
}
|
|
|
|
|
|
+ public function containerLibrary(): HasOneThrough
|
|
|
+ {
|
|
|
+ return $this->hasOneThrough(Library::class, Container::class, 'id', 'id', 'object_id', 'library_id');
|
|
|
+ }
|
|
|
+
|
|
|
public function library(): HasOneThrough
|
|
|
{
|
|
|
return $this->hasOneThrough(Library::class, Container::class, 'id', 'id', 'object_id', 'library_id');
|