More repository/service/refactor changes
This commit is contained in:
parent
2c77d5c44d
commit
b8d7d99096
44 changed files with 977 additions and 669 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue