改进 删除处理
This commit is contained in:
parent
308ed248f6
commit
a4b9254433
@ -50,8 +50,12 @@ public function renew(Host $host)
|
||||
*/
|
||||
public function destroy(Host $host): RedirectResponse
|
||||
{
|
||||
if ($host->status === 'unavailable') {
|
||||
return back()->with('error', '为了安全起见,此主机只能由我们自动删除。');
|
||||
}
|
||||
|
||||
$host->safeDelete();
|
||||
|
||||
return redirect()->route('hosts . index')->with('success', '已添加到删除队列。');
|
||||
return redirect()->route('hosts.index')->with('success', '已添加到删除队列。');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user