'required|string|max:100', ]; } public function create(): void { $this->validate(); $token = auth()->user()->createToken($this->name); $this->plainTextToken = $token->plainTextToken; $this->dispatch('apiTokenCreated'); } public static function closeModalOnClickAway(): bool { return false; } public function render(): View { return view('livewire.modals.create-api-token'); } }