Update source into github
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components\Module;
|
||||
|
||||
use App\Repositories\vCenter\vCenterRepositoryInterface;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class VCenter extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct(
|
||||
public $model = null,
|
||||
public vCenterRepositoryInterface $vCenterRepository,
|
||||
public $selected = null
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
$vcenters = $this->vCenterRepository->filter(
|
||||
[
|
||||
'status' => 1
|
||||
],
|
||||
[],
|
||||
[],
|
||||
['id', 'host']
|
||||
);
|
||||
|
||||
return view('components.module.v-center', compact('vcenters'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user