feat: refactor VM add/edit forms to include vCenter selection, host component, and new VM information fields.
This commit is contained in:
@@ -35,7 +35,8 @@ class VirtualMachineController extends Controller
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add Virtual Machine';
|
||||
return view('administrator.pages.package.vm.add', compact('title'));
|
||||
$vcenters = \App\Models\Vcenter::where('status', 1)->get();
|
||||
return view('administrator.pages.package.vm.add', compact('title', 'vcenters'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -67,8 +68,9 @@ class VirtualMachineController extends Controller
|
||||
return back()->withErrors('Invalid request.');
|
||||
}
|
||||
$vm->load('datacenter', 'host');
|
||||
$vcenters = \App\Models\Vcenter::where('status', 1)->get();
|
||||
$title = 'Edit Virtual Machine';
|
||||
return view('administrator.pages.package.vm.edit', compact('title', 'vm'));
|
||||
return view('administrator.pages.package.vm.edit', compact('title', 'vm', 'vcenters'));
|
||||
}
|
||||
|
||||
public function update(Request $request, $id)
|
||||
|
||||
Reference in New Issue
Block a user