load user

This commit is contained in:
HolgerHatGarKeineNode
2023-11-20 18:54:53 +01:00
parent 054df3b0af
commit b489f98c2a
11 changed files with 224 additions and 32 deletions

View File

@@ -2,10 +2,18 @@
namespace App\Livewire\Nostr;
use App\Models\User;
use Livewire\Component;
class Start extends Component
{
public ?User $user = null;
public function setUser($value)
{
$this->user = User::query()->with(['meetups'])->where('nostr', $value['npub'])->first();
}
public function render()
{
return view('livewire.nostr.start');

View File

@@ -14,13 +14,11 @@ use ParagonIE\CipherSweet\BlindIndex;
use ParagonIE\CipherSweet\EncryptedRow;
use ParagonIE\CipherSweet\JsonFieldMap;
use QCod\Gamify\Gamify;
use Spatie\Comments\Models\Concerns\InteractsWithComments;
use Spatie\Comments\Models\Concerns\Interfaces\CanComment;
use Spatie\LaravelCipherSweet\Concerns\UsesCipherSweet;
use Spatie\LaravelCipherSweet\Contracts\CipherSweetEncrypted;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable implements MustVerifyEmail, CanComment, CipherSweetEncrypted
class User extends Authenticatable implements MustVerifyEmail, CipherSweetEncrypted
{
use UsesCipherSweet;
use HasApiTokens;
@@ -30,7 +28,6 @@ class User extends Authenticatable implements MustVerifyEmail, CanComment, Ciphe
use Notifiable;
use TwoFactorAuthenticatable;
use HasRoles;
use InteractsWithComments;
use Gamify;
protected $guarded = [];