add event users

This commit is contained in:
2023-05-11 16:49:12 +10:00
parent fc853bd5f1
commit c471a97a23
9 changed files with 242 additions and 30 deletions

44
app/Models/EventUsers.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
namespace App\Models;
use App\Traits\Uuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class EventUser extends Model
{
use HasFactory;
use Uuids;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'event_id',
'user_id',
];
/**
* Get the event for this attachment.
*
* @return BelongsTo
*/
public function event()
{
return $this->belongsTo(Event::class);
}
/**
* Get the user for this attachment.
*
* @return BelongsTo
*/
public function user()
{
return $this->belongsTo(User::class);
}
}