'', 'projects' => fn() => \App\Models\ProjectProposal::query() ->with([ 'einundzwanzigPleb.profile', 'votes', ]) ->get(), 'isAllowed' => false, 'currentPubkey' => null, 'currentPleb' => null, ]); on([ 'nostrLoggedIn' => function ($pubkey) { $this->currentPubkey = $pubkey; $this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first(); if ($this->currentPleb->association_status->value < 2) { return $this->js('alert("Du bist hierzu nicht berechtigt.")'); } $this->isAllowed = true; }, 'nostrLoggedOut' => function () { $this->isAllowed = false; $this->currentPubkey = null; $this->currentPleb = null; }, ]); $confirmDelete = function ($id) { $notification = new Notification($this); $notification->confirm([ 'title' => 'Projektunterstützung löschen', 'message' => 'Bist du sicher, dass du diese Projektunterstützung löschen möchtest?', 'accept' => [ 'label' => 'Ja, löschen', 'method' => 'delete', 'params' => $id, ], ]); }; $delete = function ($id) { \App\Models\ProjectProposal::query()->findOrFail($id)->delete(); $this->projects = \App\Models\ProjectProposal::query() ->with([ 'einundzwanzigPleb.profile', 'votes', ]) ->get(); }; ?> @volt

Einundzwanzig Projektunterstützungen

{{--
--}}
{{ count($projects) }} Projekte
@foreach($projects as $project)
Meetup 01
Eingereicht von: {{ $project->einundzwanzigPleb->profile->name }}

{{ $project->name }}

{!! strip_tags($project->description) !!}
{{ number_format($project->support_in_sats, 0, ',', '.') }} Sats
@if($project->votes->where('value', true)->count() > 0)
Anzahl der Unterstützer: +{{ $project->votes->where('value', true)->count() }}
@endif
@if($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id) @endif
@endforeach
@endvolt