How to Implement Laravel 11 Passport Authentication for APIs

preview_player
Показать описание
Hi there 👋, I’m Soeng Souy (StarCode Kh)
-------------------------------------------
🌱 I’m currently creating a sample Laravel and React Vue Livewire
👯 I’m looking to collaborate on open-source PHP & JavaScript projects
💬 Ask me about Laravel, MySQL, or Flutter
⚡ Fun fact: I love turning ☕️ into code!
--------------------------------------------
--------------------------------------------
▸|00:00:00|Start
▸|00:00:15|Create sample project using passport REST API Authentication
▸|00:00:40|Install Laravel and create a new project
▸|00:00:56|Run: composer create-project --prefer-dist laravel/laravel app-example
▸|00:01:11|Open project
▸|00:01:32|Install Laravel passport
▸|00:01:50|Edit the .env file and configure database details in it
▸|00:02:30|Configure passport
▸|00:04:08|Migrate database
▸|00:04:24|Start MySql
▸|00:05:04|Create API routes
▸|00:05:40|Create controller and method
▸|00:07:30|Run personal generate
▸|00:08:00|php artisan serve
▸|00:08:18|Open Postman testing
▸|00:08:55|Testing register
▸|00:10:35|Success registering a new account
▸|00:12:06|Testing Login account
▸|00:14:24|Testing get all user info
--------------------------------------------
Follow Soeng Souy on:
-------------------------------------------
Enjoying the content?
=================
--------------------------------------------
--------------------------------------------
-------------------------------------------
-------------------------------------------
-------------------------------------------
-------------------------------------------
-------------------------------------------
𝗦𝘁𝗮𝗿𝗖𝗼𝗱𝗲 𝗞𝗵 :) Thank you for being so supportive!
-------------------------------------------
Master Laravel 11 Passport Authentication to build a secure REST API for your applications. This tutorial walks you through setting up Passport, registering users, issuing access tokens, and protecting routes.

✅ Learn how to:
- Install and configure Laravel Passport
- Implement user registration and login with token authentication
- Protect API routes with middleware
- Test authentication with Postman

Build robust and secure APIs with Laravel 11 Passport!

Tech Stack: Laravel 11, Passport, MySQL, Postman
#Laravel11 #LaravelPassport #APIAuthentication #RESTAPI #SecureAPI #LaravelTutorial #TokenAuth #PHP #BackendDevelopment
Рекомендации по теме
Комментарии
Автор

thank you, very understandable by a beginner

ninasarahguevarra
Автор

my code in the controller file in '\Log' and 'createToken' was in red, how can I fix this?

iDontHaveName-dq
Автор

how to use multile authentication provider in passport? ( two model member and administrator)

vcodevn
Автор

i copy 100% your code and still error \Log and createToken

Linhnguyen-woxv
visit shbcf.ru