create PM v0.5
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
Kevin Adametz 2026-05-20 19:14:39 +02:00
parent 9b47296cea
commit d2ba22c0cf
25 changed files with 2155 additions and 72 deletions

View file

@ -6,6 +6,7 @@ use App\Models\Category;
use App\Models\Company;
use App\Models\PressRelease;
use App\Services\Admin\AdminPerformanceCache;
use App\Services\PressRelease\PressReleaseHtmlSanitizer;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
@ -69,6 +70,8 @@ new #[Layout('components.layouts.app'), Title('Neue Pressemitteilung')] class ex
'language' => $this->language,
]);
$cleanText = app(PressReleaseHtmlSanitizer::class)->clean($this->text);
$pr = PressRelease::query()->create([
'uuid' => (string) Str::uuid(),
'portal' => $this->portal,
@ -78,7 +81,7 @@ new #[Layout('components.layouts.app'), Title('Neue Pressemitteilung')] class ex
'category_id' => (int) $this->categoryId,
'title' => $this->title,
'slug' => $slug,
'text' => $this->text,
'text' => $cleanText,
'keywords' => $this->keywords ?: null,
'backlink_url' => $this->backlinkUrl ?: null,
'status' => $status->value,
@ -176,7 +179,11 @@ new #[Layout('components.layouts.app'), Title('Neue Pressemitteilung')] class ex
<flux:field>
<flux:label>{{ __('Text') }} <span class="text-[color:var(--color-err)]">*</span></flux:label>
<flux:textarea wire:model="text" rows="16" placeholder="{{ __('Vollständiger Text der Pressemitteilung…') }}" />
<flux:editor
wire:model="text"
toolbar="heading | bold italic | bullet ordered blockquote | link | undo redo"
placeholder="{{ __('Vollständiger Text der Pressemitteilung…') }}"
/>
<flux:error name="text" />
</flux:field>
</div>