feat: add multiple payment events to user profile

- Added logic to handle multiple payment events in a user's profile
- Created a new PaymentEvent model and associated it with the EinundzwanzigPleb model
- Added a new migration for creating the payment_events table in the database
- Updated the profile.blade.php view to display all payment events for a user
This commit is contained in:
fsociety
2024-09-30 15:14:50 +02:00
parent 1d0c816192
commit 0bdd890dd3
4 changed files with 102 additions and 44 deletions

View File

@@ -22,4 +22,9 @@ class EinundzwanzigPleb extends Model
return $this->hasOne(Profile::class, 'pubkey', 'pubkey');
}
public function paymentEvents()
{
return $this->hasMany(PaymentEvent::class);
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class PaymentEvent extends Model
{
protected $guarded = [];
}