Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 880 Bytes

File metadata and controls

25 lines (14 loc) · 880 Bytes

Laravel 11 REST API Authentication using Sanctum

Hello developers, In this article, we'll see laravel 11 REST API authentication using Sanctum. Laravel Sanctum provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token-based APIs.

In this guide, I'll give step by step instructions to create REST API Authentication in laravel 11. Also, we'll install Laravel Sanctum via the install:api Artisan command.

Step 1: Install Laravel 11

Step 2: Install Sanctum API

Step 3: Sanctum Configuration

Step 4: Create a Model and Migration

Step 5: Create API Routes

Step 6: Create Controller Files

Step 7: Run the Laravel 11 Application