- Refactor edit.blade.php to handle admin-specific fields (accepted and sats_paid) through conditional logic.

- 📦 Upgrade Laravel framework, Livewire, and dependencies to ensure compatibility with version `13.1.1`.
This commit is contained in:
HolgerHatGarKeineNode
2026-03-23 17:50:17 +00:00
parent 347082bbc8
commit 7a992cec3f
31 changed files with 496 additions and 525 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Auth;
use App\Models\EinundzwanzigPleb;
use Illuminate\Contracts\Auth\Authenticatable;
class NostrUser implements Authenticatable
@@ -13,7 +14,7 @@ class NostrUser implements Authenticatable
public function __construct(string $pubkey)
{
$this->pubkey = $pubkey;
$this->pleb = \App\Models\EinundzwanzigPleb::query()
$this->pleb = EinundzwanzigPleb::query()
->where('pubkey', $pubkey)
->first();
}

View File

@@ -2,6 +2,7 @@
namespace App\Console\Commands\Nostr;
use App\Models\EinundzwanzigPleb;
use App\Models\Event;
use App\Traits\NostrEventRendererTrait;
use Illuminate\Console\Command;
@@ -35,7 +36,7 @@ class FetchEvents extends Command
*/
public function handle()
{
$plebs = \App\Models\EinundzwanzigPleb::query()
$plebs = EinundzwanzigPleb::query()
->get();
$subscription = new Subscription;

View File

@@ -2,6 +2,7 @@
namespace App\Console\Commands\Nostr;
use App\Models\Event;
use App\Traits\NostrEventRendererTrait;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Broadcast;
@@ -29,7 +30,7 @@ class RenderAllEvents extends Command
*/
public function handle()
{
$events = \App\Models\Event::query()
$events = Event::query()
->get();
foreach ($events as $event) {

View File

@@ -2,6 +2,7 @@
namespace App\Livewire\Traits;
use App\Models\EinundzwanzigPleb;
use App\Support\NostrAuth;
use Illuminate\Support\Facades\RateLimiter;
use Livewire\Attributes\On;
@@ -32,7 +33,7 @@ trait WithNostrAuth
NostrAuth::login($pubkey);
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
$this->currentPleb = EinundzwanzigPleb::query()
->where('pubkey', $pubkey)
->first();

View File

@@ -22,13 +22,10 @@ class ProjectProposal extends Model implements HasMedia
/** @var list<string> */
protected $fillable = [
'einundzwanzig_pleb_id',
'name',
'description',
'support_in_sats',
'website',
'accepted',
'sats_paid',
];
/**

View File

@@ -3,6 +3,7 @@
namespace App\Policies;
use App\Auth\NostrUser;
use App\Models\EinundzwanzigPleb;
use App\Models\ProjectProposal;
class ProjectProposalPolicy
@@ -87,7 +88,7 @@ class ProjectProposalPolicy
}
/**
* @param \App\Models\EinundzwanzigPleb $pleb
* @param EinundzwanzigPleb $pleb
*/
private function isBoardMember(object $pleb): bool
{

View File

@@ -3,6 +3,7 @@
namespace App\Traits;
use App\Models\Profile;
use Illuminate\Support\Facades\Http;
use swentel\nostr\Filter\Filter;
use swentel\nostr\Key\Key;
use swentel\nostr\Message\RequestMessage;
@@ -21,7 +22,7 @@ trait NostrFetcherTrait
public function getNip05HandlesForPubkey(string $pubkey): array
{
try {
$response = \Illuminate\Support\Facades\Http::get(
$response = Http::get(
'https://einundzwanzig.space/.well-known/nostr.json',
);
$data = $response->json();