Add support for deleting service packs.
This commit is contained in:
parent
d4729427aa
commit
5600f3201c
3 changed files with 39 additions and 14 deletions
|
@ -225,4 +225,13 @@ class Pack
|
|||
});
|
||||
}
|
||||
|
||||
public function delete($id) {
|
||||
$pack = Models\ServicePack::findOrFail($id);
|
||||
// @TODO Check for linked servers; foreign key should block this.
|
||||
DB::transaction(function () use ($pack) {
|
||||
$pack->delete();
|
||||
Storage::deleteDirectory('packs/' . $pack->uuid);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue