Back to Browse

Laravel tutorial - sanctum | API authorization example

12.1K views
Premiered Mar 29, 2020
14:37

In this laravel tutorial, here we learn what is sanctum and how we can make api and secure it with sanctum API with simple and easy example this tutorial video made by anil Sidhu in the English language github repo link is here :https://github.com/anil-sidhu/laravel-sanctum steps of video setup database in .env file Install Laravel Sanctum. Publish the Sanctum configuration and migration files Run your database migrations. Add the Sanctum's middleware. To use tokens for users. Let's create the seeder for the User model Now let's insert as record To seed users table with user create a controller nad /login route in the routes/api.php file: Test with postman, Result will be below Make Details API or any other with secure route Checkout and subscribe our new channel for technical news https://www.youtube.com/channel/UCUu2FA5OO9KpFXL2ZYR0aNg

Download

0 formats

No download links available.

Laravel tutorial - sanctum | API authorization example | NatokHD