1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 23:42:32 +01:00

Updated yabs delete

Updated yabs delete
This commit is contained in:
cp6 2022-03-05 11:57:12 +11:00
parent b3ed167ed9
commit b4f214f376

View File

@ -130,9 +130,18 @@ class YabsController extends Controller
public function destroy(Yabs $yab)
{
$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')
->with('success', 'YABs was deleted Successfully.');