submit settings

This commit is contained in:
Shohrat 2023-11-21 11:44:31 +05:00
parent 7d851c3164
commit 37c0dece62
1 changed files with 2 additions and 1 deletions

View File

@ -36,9 +36,10 @@ public function submit(Request $request){
$data['consent_form_third'] = $data['consent_form_third'] ?? false;
$attender = Attender::create($data);
$attender->events()->attach($request->event_id);
if($data['is_attending']){
$attender->events()->attach($request->event_id);
$attendance = DB::table('event_attenders')
->where('event_id', $request->event_id)
->where('attender_id', $attender->id)