修复 无法删除的 bug
This commit is contained in:
parent
852dbcb50e
commit
ac0b0da416
@ -131,15 +131,13 @@ public function destroy($host)
|
|||||||
if ($host instanceof Host) {
|
if ($host instanceof Host) {
|
||||||
$host->delete();
|
$host->delete();
|
||||||
} else {
|
} else {
|
||||||
$host = Host::where('id', $host)->first($host);
|
$host = Host::findOrFail($host);
|
||||||
|
|
||||||
if ($host) {
|
if ($host) {
|
||||||
$host->delete();
|
$host->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $this->deleted($host);
|
return $this->deleted($host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user