优化 代码格式
This commit is contained in:
parent
86da37fe19
commit
682a8e7d02
@ -127,14 +127,13 @@ public function update(Request $request, Host $host): JsonResponse
|
||||
*/
|
||||
public function destroy($host): JsonResponse
|
||||
{
|
||||
if ($host instanceof Host) {
|
||||
$host->delete();
|
||||
} else {
|
||||
// if host not instance of Host
|
||||
if (!$host instanceof Host) {
|
||||
$host = Host::findOrFail($host);
|
||||
|
||||
$host?->delete();
|
||||
}
|
||||
|
||||
return $this->deleted($host);
|
||||
$host?->delete();
|
||||
|
||||
return $this->deleted();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user