mirror of
				https://github.com/cp6/my-idlers.git
				synced 2025-11-04 08:09:09 +00:00 
			
		
		
		
	Updated yabs delete
Updated yabs delete
This commit is contained in:
		
							parent
							
								
									b3ed167ed9
								
							
						
					
					
						commit
						b4f214f376
					
				
					 1 changed files with 11 additions and 2 deletions
				
			
		| 
						 | 
					@ -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…
	
	Add table
		
		Reference in a new issue