mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-20 07:13:45 +02:00
More repository/service/refactor changes
This commit is contained in:
@@ -36,4 +36,31 @@ class ServiceOptionRepository extends EloquentRepository implements ServiceOptio
|
||||
{
|
||||
return ServiceOption::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getWithVariables($id)
|
||||
{
|
||||
return $this->getBuilder()->with('variables')->find($id, $this->getColumns());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getWithCopyFrom($id)
|
||||
{
|
||||
return $this->getBuilder()->with('copyFrom')->find($id, $this->getColumns());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isCopiableScript($copyFromId, $service)
|
||||
{
|
||||
return $this->getBuilder()->whereNull('copy_script_from')
|
||||
->where('id', '=', $copyFromId)
|
||||
->where('service_id', '=', $service)
|
||||
->exists();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user