Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Laravel 8 REST API With Sanctum Authentication

Traversy Media via YouTube

Overview

Build a beginner-friendly REST API from scratch using Laravel 8 and implement authentication using API keys with Laravel Sanctum in this comprehensive 54-minute tutorial. Learn to set up Laravel, configure SQLite, create basic routing, develop a Product model and migration, utilize the model, and implement CRUD operations for products. Explore Sanctum setup, route protection, user registration, token generation, logout functionality, and user login. Follow along with provided code examples and consult the Laravel Sanctum documentation for additional reference. Master the essentials of creating a secure and functional REST API with Laravel 8 and Sanctum authentication.

Syllabus

- Intro.
- Set Up Laravel.
- SQLite Setup.
- Basic Routing.
- Product Model & Migration.
- Using the Model.
- Product Controller & Methods.
- Create Products & Validation.
- Single Product & Resource Routes.
- Update Product.
- Delete Product.
- Search Products.
- Sanctum Setup.
- Protecting Routes.
- Auth Controller.
- Register User & Get Token.
- Logout & Delete Token.
- Login User & Get Token.

Taught by

Traversy Media

Reviews

Start your review of Laravel 8 REST API With Sanctum Authentication

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.