Fix grepping about.
This commit is contained in:
parent
cea2d040eb
commit
788de1b23a
|
@ -54,7 +54,7 @@ class ServiceVariable extends Model
|
||||||
'required' => 'integer',
|
'required' => 'integer',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function ServerVariable()
|
public function serverVariable()
|
||||||
{
|
{
|
||||||
return $this->hasMany(ServerVariable::class, 'variable_id');
|
return $this->hasMany(ServerVariable::class, 'variable_id');
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,11 +76,11 @@ class Variable
|
||||||
|
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$variable = Models\ServiceVariable::with('ServerVariable')->findOrFail($id);
|
$variable = Models\ServiceVariable::with('serverVariable')->findOrFail($id);
|
||||||
|
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
try {
|
try {
|
||||||
foreach ($variable->ServerVariable as $svar) {
|
foreach ($variable->serverVariable as $svar) {
|
||||||
$svar->delete();
|
$svar->delete();
|
||||||
}
|
}
|
||||||
$variable->delete();
|
$variable->delete();
|
||||||
|
|
Loading…
Reference in New Issue