This commit is contained in:
pbao9
2026-02-06 20:52:59 +07:00
parent d7aadf7544
commit e7b9ce7485
17 changed files with 570 additions and 36 deletions
@@ -48,8 +48,11 @@ class ProductController extends Controller
// Fetch OS versions with their group for the OS selector component
$osVersions = \App\Models\Os::with('osGroup')->where('status', 1)->get();
// Fetch Control Panels for Hosting products
$controlPanels = \App\Models\ControlPanel::active()->ordered()->get();
if ($step === 1) {
return view("administrator.pages.product.create", compact('group', 'type', 'title', 'osVersions'));
return view("administrator.pages.product.create", compact('group', 'type', 'title', 'osVersions', 'controlPanels'));
}
if (!$request->has(['step', 'type'])) {
@@ -97,7 +100,10 @@ class ProductController extends Controller
$view = "administrator.pages.product.edit";
$data = compact('product', 'title', 'group', 'type', 'osVersions');
// Fetch Control Panels for Hosting products
$controlPanels = \App\Models\ControlPanel::active()->ordered()->get();
$data = compact('product', 'title', 'group', 'type', 'osVersions', 'controlPanels');
return view($view, $data);
}