Files
Website/app/Models/EventUsers.php
2023-05-24 21:33:16 +00:00

45 lines
770 B
PHP

<?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(): BelongsTo
{
return $this->belongsTo(Event::class);
}
/**
* Get the user for this attachment.
*
* @return BelongsTo
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}