feat: Implement product and product category management with dedicated CRUD operations, services, and repositories.
This commit is contained in:
@@ -121,7 +121,7 @@ class VirtualMachineController extends Controller
|
||||
{
|
||||
$query = $this->virtualMachineRepository->filter(
|
||||
$request->all(),
|
||||
['datacenter', 'host'],
|
||||
['datacenter'],
|
||||
[],
|
||||
['*'],
|
||||
true
|
||||
@@ -131,17 +131,15 @@ class VirtualMachineController extends Controller
|
||||
->addColumn(
|
||||
'action',
|
||||
function ($d) {
|
||||
return '<a href="' . route('package.vm.edit', $d->id) . '" class="btn btn-warning btn-sm"><i class="fas fa-search"></i></a>
|
||||
<form method="post" class="d-inline" action="' . route('package.vm.destroy', $d->id) . '">
|
||||
' . csrf_field() . '
|
||||
' . method_field('delete') . '
|
||||
<button type="submit" class="btn btn-sm btn-danger"><i class="fas fa-trash"></i></button>
|
||||
</form>';
|
||||
return view('administrator.pages.package.vm.datatable.action', ['row' => $d])->render();
|
||||
}
|
||||
)
|
||||
->editColumn('updated_at', function ($d) {
|
||||
return $d->updated_at ? $d->updated_at->format('H:i:s d/m/Y') : '';
|
||||
})
|
||||
->editColumn('datacenter.name', function ($d) {
|
||||
return $d->datacenter ? $d->datacenter->name . ' - ' . $d->datacenter->datacenter_id : 'N/A';
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user