Updated yabs delete
Updated yabs delete
This commit is contained in:
parent
b3ed167ed9
commit
b4f214f376
|
@ -130,9 +130,18 @@ class YabsController extends Controller
|
||||||
public function destroy(Yabs $yab)
|
public function destroy(Yabs $yab)
|
||||||
{
|
{
|
||||||
$id = $yab->id;
|
$id = $yab->id;
|
||||||
$items = Yabs::find($id);
|
$yabs = Yabs::find($id);
|
||||||
|
$yabs->delete();
|
||||||
|
|
||||||
$items->delete();
|
$disk = DiskSpeed::find($id);
|
||||||
|
$disk->delete();
|
||||||
|
|
||||||
|
$network = NetworkSpeed::find($id);
|
||||||
|
$network->delete();
|
||||||
|
|
||||||
|
$update_server = DB::table('servers')
|
||||||
|
->where('id', $yab->server_id)
|
||||||
|
->update(['has_yabs' => 0]);
|
||||||
|
|
||||||
return redirect()->route('yabs.index')
|
return redirect()->route('yabs.index')
|
||||||
->with('success', 'YABs was deleted Successfully.');
|
->with('success', 'YABs was deleted Successfully.');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user