Home Laravel 9 Laravel 9 Sanctum Authentication REST API

Laravel 9 Sanctum Authentication REST API

3 min read

in this will teach about the Sanctum Authentication REST API with token step by step.
we have created the user register api and login api using Sanctum.

Install laravel

after installed  the laravel .Open up the project into vs code editor.

Create the Database in Mysql. which name dblms

After that open the .env file and changes database name as dblms.

Install Laravel Sanctum

Publish Sanctum

After that create and tables and token running the migration command

After that your tables has been created.and model also created.

Create the Controller

Inside the UserController paste this below code


Open in file api.php

i have attached the video link below. which will do this tutorials step by step.


    Load More Related Articles
    Load More By admin
    Load More In Laravel 9

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Check Also

    Create Maven project in Intellij

    In this tutorial will see how to create Maven project in Intellij step by step. First Step…