update host

This commit is contained in:
pbao9
2026-01-31 10:46:49 +07:00
parent 27f365d8cf
commit e0efaa9ffe
5 changed files with 184 additions and 176 deletions
+6 -3
View File
@@ -27,7 +27,7 @@ class Host extends Controller
public function index(Request $request)
{
$title = 'List all Host';
return view("admin.package.host.index", compact('title'));
return view("administrator.pages.package.host.index", compact('title'));
}
public function datatable(Request $request)
@@ -44,6 +44,9 @@ class Host extends Controller
->editColumn('updated_at', function ($d) {
return $d->updated_at ? $d->updated_at->format('d/m/Y') : '';
})
->editColumn('datacenter.name', function ($d) {
return $d->datacenter->name . ' - ' . $d->datacenter->datacenter_id;
})
->addColumn('action', function ($d) {
$editUrl = route('package.host.edit', ['id' => $d->id]);
$deleteBtn = '';
@@ -92,7 +95,7 @@ HTML;
{
$title = 'Add host';
return view('admin.package.host.add', compact('title'));
return view('administrator.pages.package.host.add', compact('title'));
}
public function store(HostRequest $request)
{
@@ -123,7 +126,7 @@ HTML;
}
$title = "View Host Information";
return view('admin.package.host.edit', compact('host', 'title'));
return view('administrator.pages.package.host.edit', compact('host', 'title'));
}
public function update(int $id = 0, HostRequest $request)
{