Add stubs for various Laravel components and scaffolding
- Created stubs for JavaScript and SASS assets. - Added stubs for channel, command, component, controller, event, factory, job, listener, mail, middleware, migration, model, notification, observer, policy, request, resource, route provider, seeder, and validation rule. - Implemented scaffolding for configuration, service provider, and Vite integration. - Included example views for module structure. - Introduced a module loader for Vite to handle asset paths dynamically.
This commit is contained in:
@@ -66,4 +66,29 @@ class Client
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
public function SetConfig($data): static
|
||||
{
|
||||
$this->username = $data['user'] ?? $data->user;
|
||||
$this->password = \App\Http\Facade\SignRSA::DecryptFunc($data['password'] ?? $data->password);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function resolveVCenterFromProduct(\App\Models\ModuleVmware $product): ?\App\Models\vCenter
|
||||
{
|
||||
if ($product->vCenter) {
|
||||
return $product->vCenter;
|
||||
}
|
||||
if ($product->ipAddress?->host?->datacenter?->vCenter) {
|
||||
return $product->ipAddress->host->datacenter->vCenter;
|
||||
}
|
||||
$service = $product->services()->first();
|
||||
if ($service) {
|
||||
$service->load('vmware.vCenter');
|
||||
if ($service->vmware?->vCenter) {
|
||||
return $service->vmware->vCenter;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user