su-secret-santa/resources/views/livewire/pages/profile.blade.php

27 lines
567 B
PHP

<?php
use App\Models\Participant;
use Illuminate\Support\Facades\Log;
use function Livewire\Volt\{computed, state};
state(['token'])->url();
$participant = computed(function () {
return Participant::findByToken($this->token);
});
$userData = computed(function () {
return $this->participant->getUserData();
});
?>
@if($this->participant)
<div>
<pre>{{ $this->participant }}</pre>
@if($this->userData)
<h1><img src ="{{ $this->userData['data']['profile_image_url'] }}"> {{ $this->userData['data']['username'] }}</h1>
@endif
</div>
@endif