Refactor destination/all.blade.php for improved code structure and readability

This commit is contained in:
Andras Bacsai 2024-05-15 14:10:44 +02:00
parent aa0a9bde76
commit ed5188069b

View File

@ -11,22 +11,22 @@
<div class="grid gap-2 lg:grid-cols-1">
@forelse ($destinations as $destination)
@if ($destination->getMorphClass() === 'App\Models\StandaloneDocker')
<div class="box group">
<a class="flex flex-col mx-6"
<a class="box group"
href="{{ route('destination.show', ['destination_uuid' => data_get($destination, 'uuid')]) }}">
<div class="box-title">{{ $destination->name }}</div>
<div class="box-description">server: {{ $destination->server->name }}</div>
<div class="flex flex-col mx-6">
<div class="box-title">{{ $destination->name }}</div>
<div class="box-description">server: {{ $destination->server->name }}</div>
</div>
</a>
</div>
@endif
@if ($destination->getMorphClass() === 'App\Models\SwarmDocker')
<div class="box group">
<a class="flex flex-col mx-6"
<a class="box group"
href="{{ route('destination.show', ['destination_uuid' => data_get($destination, 'uuid')]) }}">
<div class="box-title">{{ $destination->name }}</div>
<div class="box-description">server: {{ $destination->server->name }}</div>
<div class="flex flex-col mx-6">
<div class="box-title">{{ $destination->name }}</div>
<div class="box-description">server: {{ $destination->server->name }}</div>
</div>
</a>
</div>
@endif
@empty
<div>