PHP Package: laravel/sanctum

Laravel Sanctum provides a lightweight authentication system for SPAs and simple APIs. It is easy to use and integrates seamlessly with Laravel applications.

Current Version: 4.0.8
Last Updated: 2025-01-28
PHP Requirement: >=7.1
Dependencies: illuminate/support, illuminate/http, symfony/http-foundation
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Laravel Sanctum is a simple package to handle API token authentication. It is perfect for single-page applications and mobile apps. Sanctum provides a simple way to authenticate users and issue tokens for API requests.

🔗 View on GitHub

Download Latest Version: 4.0.8

Download Download v4.0.8

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php

// Example from PHPlibraries.com
require_once 'libs/laravel/sanctum/4.0.8/autoload.php';

use Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful;


$obj = new Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful();
echo "✅ Example created successfully.";

?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.