skulich/laravel-clavis 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

skulich/laravel-clavis

最新稳定版本:1.0.0

Composer 安装命令:

composer require skulich/laravel-clavis

包简介

Laravel Clavis is a lightweight token-based authentication middleware package for Laravel APIs

README 文档

README

Latest Version on Packagist PHP Version Require Laravel Version Run Tests Code Coverage License Total Downloads

Laravel Clavis is a lightweight token-based authentication middleware package for Laravel APIs.

Perfect for API-first applications and microservices where you need simple and secure token-based authentication without the overhead of Sanctum.

Key benefits:

  • 🚀 Quick Setup: Create a token via CLI
  • 🔒 Secure: Built on Laravel's native Hash generator
  • 🎯 Focused: Designed for server-to-server scenarios
  • 🧹 Clean: No migrations, No users, No dependencies

Table of contents

Installation

Install the package via Composer.

composer require skulich/laravel-clavis

Usage

CLI Command

Create a new API token via CLI.

php artisan clavis:token

API Middleware

Add the clavis middleware to your API routes.

// Per Route
Route::get('/test', function (Request $request) {
    // return ...
})->middleware('clavis');

// Per Group
Route::middleware('clavis')->group(function () {
    // Route:: ...
});

// Globally in app/bootstrap/app.php
->withMiddleware(function (Middleware $middleware): void {
    $middleware->appendToGroup('api', 'clavis');
})

Tests

Run the entire test suite:

composer test

Changelog

Please see CHANGELOG for more information.

Contributing

Please see CONTRIBUTING for more information.

License

The MIT License (MIT). Please see LICENSE for more information.

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-02