country = request()->route('country', config('app.domain_country')); } public function filterByType(?string $type): void { $this->typeFilter = $this->typeFilter === $type ? null : $type; $this->resetPage(); } public function with(): array { return [ 'services' => SelfHostedService::query() ->with('createdBy') ->when($this->search, fn($q) => $q->where('name', 'ilike', '%'.$this->search.'%')) ->when($this->typeFilter, fn($q) => $q->where('type', $this->typeFilter)) ->orderBy('name') ->paginate(15), 'types' => \App\Enums\SelfHostedServiceType::cases(), ]; } }; ?>
{{ __('Self Hosted Services') }}
@auth {{ __('Service erstellen') }} @endauth
@foreach($types as $type) {{ $type->label() }} @endforeach @if($typeFilter) {{ __('Filter zurücksetzen') }} @endif
{{ __('Name') }} {{ __('Typ') }} {{ __('Links') }} {{ __('Erstellt von') }} {{ __('Datum') }} @foreach ($services as $service) {{ $service->name }} @if($service->type) {{ $service->type->label() }} @endif
@if($service->url_clearnet) Clearnet @endif @if($service->url_onion) Onion @endif @if($service->url_i2p) I2P @endif @if($service->url_pkdns) pkdns @endif
@if($service->createdBy)
{{ Str::length($service->createdBy->name) > 10 ? Str::substr($service->createdBy->name, 0, 4) . '...' . Str::substr($service->createdBy->name, -3) : $service->createdBy->name }}
@else {{ __('Anonymous') }} @endif
{{ $service->created_at->format('d.m.Y') }}
@if($service->created_at->ne($service->updated_at))
{{ $service->updated_at->format('d.m.Y') }}
@endif
@endforeach