url(); state([ 'participant' => null, 'userData' => null, 'prompt' => '', 'isEditing' => false, ]); rules([ 'prompt' => 'required|string|min:3', ]); mount(function () { if ($this->token) { $this->participant = Participant::findByToken($this->token); if ($this->participant) { $this->userData = $this->participant->getUserData(); $this->prompt = $this->participant->prompt ?? ''; } } }); $save = function () { if ($this->participant) { $this->validate(); $this->participant->prompt = $this->prompt; $this->participant->save(); $this->isEditing = false; } }; $cancel = function () { $this->prompt = $this->participant->prompt ?? ''; $this->isEditing = false; }; ?>
Your prompt is: {{ $prompt ?: 'No prompt set yet.' }}
{{ $participant->giving_id }}
@elseif($participant->desperate)You're in a bind!
@elseYou haven't been assigned anyone.
@endif @endif