Files
einundzwanzig-verein/database/factories/PaymentEventFactory.php
HolgerHatGarKeineNode 7a992cec3f - 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`.
2026-03-23 17:50:17 +00:00

40 lines
868 B
PHP

<?php
namespace Database\Factories;
use App\Models\EinundzwanzigPleb;
use App\Models\PaymentEvent;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<PaymentEvent>
*/
class PaymentEventFactory extends Factory
{
public function definition(): array
{
return [
'einundzwanzig_pleb_id' => EinundzwanzigPleb::factory(),
'year' => fake()->year(),
'event_id' => fake()->uuid(),
'amount' => 21000,
'paid' => false,
'btc_pay_invoice' => null,
];
}
public function paid(): self
{
return $this->state(fn (array $attributes) => [
'paid' => true,
]);
}
public function withYear(int $year): self
{
return $this->state(fn (array $attributes) => [
'year' => $year,
]);
}
}