wip: ui for services

This commit is contained in:
Andras Bacsai
2023-09-22 11:23:49 +02:00
parent 4ae7e46e81
commit 53d1fa0331
32 changed files with 575 additions and 250 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace App\View\Components\Services;
use App\Models\Service;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Collection;
use Illuminate\View\Component;
class Links extends Component
{
public Collection $links;
public function __construct(public Service $service)
{
$this->links = collect([]);
$service->applications()->get()->map(function ($application) {
$this->links->push($application->fqdn);
});
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.services.links');
}
}