how do i manage users using the rest api at laravel jetstream?

As Maarteen pointed out, I had to use the routes provided by Jetstream:

To update the current user’s profile information with API support turned on, a PUT request must be called to the user/profile-information route.

To change his/her password, a PUT request must be called to the user/password route. Here, the App\Actions\Fortify\UpdateUserPassword action is called, which uses the password validation rules provided by the App\Actions\Fortify\PasswordValidationRules class.

To manage users by an administrator I had to create a new controller with custom actions, but for example, for the new user creation logic I used the CreatesNewUsers class to get the input and it uses the App\Actions\Fortify\CreateNewUserclass, which can be customized.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top