Show API Token after creation
I am trying to set up a CreateAction in a RelationManager for a model that uses the HasApiTokens-trait. The problem is that I didn't find any good way to show the plainTextToken to the user after creation. Several problems occur when using a modal/action here:
1. The modal gets automatically closed after creation
2. If I call $action->halt() the modal stays open but I have no way to update the field for the plaintexttoken
The closest I could get:
Issues using this approach: Token is not updated right way, is not copyable and still shown on new modal
3 Replies
I would just use a Wizard, afterstatevalidated, you store the token etc, and on step 2, you render the token.
Can I have a submit action on step 1 and an infolist on step 2 in a wizard?
Hmm yes you could load an info list as a custom live wire component in the form.