lecturer->load('media'); $this->name = $this->lecturer->name ?? ''; $this->subtitle = $this->lecturer->subtitle; $this->intro = $this->lecturer->intro; $this->description = $this->lecturer->description; $this->active = (bool) $this->lecturer->active; $this->website = $this->lecturer->website; $this->twitter_username = $this->lecturer->twitter_username; $this->nostr = $this->lecturer->nostr; $this->lightning_address = $this->lecturer->lightning_address; $this->lnurl = $this->lecturer->lnurl; $this->node_id = $this->lecturer->node_id; $this->paynym = $this->lecturer->paynym; $this->created_by = $this->lecturer->created_by; $this->created_at = $this->lecturer->created_at?->format('Y-m-d H:i:s'); $this->updated_at = $this->lecturer->updated_at?->format('Y-m-d H:i:s'); } public function updateLecturer(): void { $validated = $this->validate([ 'name' => ['required', 'string', 'max:255', Rule::unique('lecturers')->ignore($this->lecturer->id)], 'subtitle' => ['nullable', 'string'], 'intro' => ['nullable', 'string'], 'description' => ['nullable', 'string'], 'active' => ['boolean'], 'website' => ['nullable', 'url', 'max:255'], 'twitter_username' => ['nullable', 'string', 'max:255'], 'nostr' => ['nullable', 'string', 'max:255'], 'lightning_address' => ['nullable', 'string'], 'lnurl' => ['nullable', 'string'], 'node_id' => ['nullable', 'string', 'max:255'], 'paynym' => ['nullable', 'string'], ]); $this->lecturer->update($validated); if ($this->avatar) { $this->lecturer->clearMediaCollection('avatar'); $this->lecturer ->addMedia($this->avatar->getRealPath()) ->usingName($this->lecturer->name) ->toMediaCollection('avatar'); $this->avatar = null; $this->lecturer->load('media'); } $this->dispatch('lecturer-updated', name: $this->lecturer->name); session()->flash('status', __('Dozent erfolgreich aktualisiert!')); } }; ?>
{{ __('Dozent bearbeiten') }}: {{ $lecturer->name }}
{{ __('Grundlegende Informationen') }}
@if (!$avatar && $lecturer->getFirstMedia('avatar')) Avatar @elseif($avatar) Avatar @else @endif
{{ __('ID') }} {{ __('System-generierte ID (nur lesbar)') }} {{ __('Name') }} * {{ __('Vollständiger Name des Dozenten') }} {{ __('Untertitel') }} {{ __('Kurze Berufsbezeichnung oder Rolle') }} {{ __('Status') }} {{ __('Ist dieser Dozent aktiv?') }}
{{ __('Einführung') }} {{ __('Kurze Vorstellung (wird auf Kurs-Seiten angezeigt)') }} {{ __('Beschreibung') }} {{ __('Ausführliche Beschreibung und Biografie') }}
{{ __('Links & Soziale Medien') }}
{{ __('Webseite') }} {{ __('Persönliche Webseite oder Portfolio') }} {{ __('Twitter Benutzername') }} {{ __('Twitter-Handle ohne @ Symbol') }} {{ __('Nostr') }} {{ __('Nostr öffentlicher Schlüssel') }}
{{ __('Zahlungsinformationen') }}
{{ __('Lightning Adresse') }} {{ __('Lightning-Adresse für Zahlungen') }} {{ __('LNURL') }} {{ __('LNURL für Lightning-Zahlungen') }} {{ __('Node ID') }} {{ __('Lightning Node ID') }} {{ __('PayNym') }} {{ __('PayNym für Bitcoin-Zahlungen') }}
{{ __('Systeminformationen') }}
{{ __('Erstellt von') }} {{ __('Ersteller des Dozenten') }} {{ __('Erstellt am') }} {{ __('Wann dieser Dozent erstellt wurde') }} {{ __('Aktualisiert am') }} {{ __('Letzte Änderungszeit') }}
{{ __('Abbrechen') }}
@if (session('status')) {{ session('status') }} @endif {{ __('Dozent aktualisieren') }}