Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Code Examples of auth sanctum

Discover how to use Laravel's auth sanctum method in real-world applications. Browse 8 examples from popular open-source projects.

8 examples

koel/koel

  • 16858
  • Created Dec 2015
  • Updated Nov 2025

Files in this example

  • composer.json
    • app/Models/User.php
      • app/Services/TokenManager.php
        • app/Http/Controllers/API/AuthController.php
          • config/auth.php
View full example

bytefury/crater

  • 8213
  • Created Nov 2019
  • Updated Aug 2024

Files in this example

  • composer.json
    • app/Models/User.php
      • routes/api.php
        • app/Http/Controllers/V1/Mobile/AuthController.php
View full example

familytree365/backend

  • 90
  • Created May 2021
  • Updated Aug 2021

Files in this example

  • composer.json
    • app/Http/Kernel.php
      • app/Http/Controllers/LoginController.php
        • app/Models/User.php
          • routes/api.php
            • app/Http/Controllers/RoleController.php
View full example

PrijalBista/laravel-api-auth-sanctum-boilerplate

  • 63
  • Created Apr 2021
  • Updated Aug 2022

Files in this example

  • app/Models/User.php
    • app/Http/Controllers/Api/Auth/AuthController.php
      • routes/api.php
View full example

ammannbe/RecipeManager

  • 37
  • Created Dec 2018
  • Updated Feb 2023

Files in this example

  • composer.json
    • app/Http/Kernel.php
      • app/Models/Users/User.php
View full example

unlikenesses/sanctum-flutter-backend

  • 22
  • Created Sep 2020
  • Updated Oct 2020

Files in this example

  • composer.json
    • routes/api.php
      • app/Http/Controllers/AuthController.php
View full example

javierpomachagua/demo-auth-laravel

  • 0
  • Created Jul 2021
  • Updated Jul 2021

Files in this example

  • composer.json
    • routes/api.php
      • app/Http/Kernel.php
        • app/Http/Controllers/Auth/AuthenticatedSessionController.php
View full example

JaskaranSingh4704/laravel-react

  • 0
  • Created Mar 2017
  • Updated May 2021

Files in this example

  • composer.json
    • app/Models/User.php
      • app/Http/Controllers/Api/Auth/LoginController.php
        • routes/api/auth.php
View full example

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.