Skip to main content

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

  • 17177
  • Created Dec 2015
  • Updated Jun 2026

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

  • 8305
  • 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

  • 89
  • 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

  • 38
  • Created Dec 2018
  • Updated Dec 2025

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