Make sure that your password is at least 8 characters long. To create a new user, make a POST request to with a name, email, and password. Now, we can make the requests in Insomnia as in the following examples. The application should be running on and we can access the API on. We’ll do that by running the command below in our terminal: Let’s start by creating a new Laravel application. Basic knowledge of using an HTTP client such as Insomnia.Īs you can see Laravel Sanctum does much more, but in this tutorial, we will be using Laravel Sanctum to create APIs.In order to complete this tutorial, you will need the following: Sanctum works with SPAs (Single Page Applications like Vue, Angular, and React) and supports mobile application authentication.Sanctum is a featherweight, meaning it is light and simple to implement.If you are not using that, then Sanctum is your go-to for issuing API tokens.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |