mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 22:03:44 +02:00
Return packs associated with a service when viewing it on the API.
This commit is contained in:
@@ -60,4 +60,14 @@ class ServiceOptions extends Model
|
||||
{
|
||||
return $this->hasMany(ServiceVariables::class, 'option_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all packs associated with this service.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function packs()
|
||||
{
|
||||
return $this->hasMany(ServicePack::class, 'option');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user