Auth::user()->tokens, ]); } public function rules(): array { return [ 'name' => 'required|string|max:255', ]; } public function createToken(): void { $this->validate(); $newToken = Auth::user()->createToken($this->name); $this->newTokenString = $newToken->accessToken; $this->dispatchBrowserEvent('tokenCreated', $newToken->accessToken); } public function deleteToken($tokenId): void { //this needs safety (though the scope of auth::user might kind of do it...) //seems like it does, test more Auth::user()->tokens()->find($tokenId)->delete(); } }