start guest invitation on event
This commit is contained in:
@@ -2,9 +2,18 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class Event extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
public function guests() :BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'event_guest')
|
||||
->withPivot('is_staff', 'validated_at')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user