service->load('createdBy'); $this->country = request()->route('country', config('app.domain_country')); } public function delete(): void { // Only allow deletion if user is the creator if (auth()->id() === $this->service->created_by) { $this->service->delete(); session()->flash('status', __('Service erfolgreich gelöscht!')); redirect()->route('services.index', ['country' => $this->country]); } else { abort(403); } } public function with(): array { return [ 'service' => $this->service, ]; } }; ?> @section('meta') @php $SEOData = SeoDataAttribute::getData('meetups_landingpage'); $SEOData->title = $this->service->name; $SEOData->description = $this->service->intro ? str($this->service->intro)->limit(50) : $SEOData->description; @endphp {!! seo($SEOData)->render() !!} @endsection
{{ $service->name }} @auth @if(auth()->id() === $service->created_by)
{{ __('Bearbeiten') }} {{ __('Löschen') }}
@endif @endauth
@if($service->type) {{ $service->type->label() }} @endif
@if($service->intro) {{ __('Beschreibung') }}
{{ $service->intro }}
@endif @if($service->contact) {{ __('Kontakt') }}
{{ $service->contact }}
@endif
{{ __('Zugriff') }}
@if($service->url_clearnet)
Clearnet
{{ __('Copy') }}
@endif @if($service->url_onion)
Onion / Tor
{{ __('Copy') }}
@endif @if($service->url_i2p)
I2P
{{ __('Copy') }}
@endif @if($service->url_pkdns)
pkdns
{{ __('Copy') }}
@endif @if($service->ip)
{{ $service->ip }}
{{ __('Copy') }}
@endif
{{ __('Informationen') }}
{{ __('Erstellt von') }}
@if($service->anon || !$service->createdBy) {{ __('Anonymous') }} @else
{{ $service->createdBy->name }}
@endif
{{ __('Erstellt am') }}
{{ $service->created_at->format('d.m.Y H:i') }}
@if($service->created_at->ne($service->updated_at))
{{ __('Zuletzt aktualisiert') }}
{{ $service->updated_at->format('d.m.Y H:i') }}
@endif
{{ __('Zurück zur Übersicht') }}
{{ __('Service löschen?') }} {{ __('Möchten Sie den Service wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.') }}
{{ __('Abbrechen') }} {{ __('Löschen') }}