Is there a way to create an API token when you create a new user?
If so, how? I could only find the official Laravel doc, but for some reason, the api_topken ALWAYS shows up as null at the table. The mostly has to do with the fact that Im not creating an account from the login page, but from here. Is there a way to do this in filament?
2 Replies
with hooks https://filamentphp.com/docs/2.x/admin/resources/creating-records#lifecycle-hooks
or observers https://laravel.com/docs/10.x/eloquent#observers
?
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Filament
Creating records - Resources - Admin Panel - Filament
The elegant TALL stack admin panel for Laravel artisans.
Can also just use an action to insert data into the API token table after user creation