litepie/integrations
最新稳定版本:v1.0.3
Composer 安装命令:
composer require litepie/integrations
包简介
A Laravel package for managing API integrations similar to Facebook/Google applications
README 文档
README
A production-ready Laravel package for managing API integrations and OAuth applications. This package provides a complete integration management system with multi-tenant support.
Requirements
- PHP 8.2 or higher
- Laravel 12.x
- MySQL 8.0+ / PostgreSQL 13+ / SQLite 3.35+
Features
- Create and manage API integrations (OAuth clients)
- Auto-generated Client ID and Client Secret
- Multiple redirect URIs support
- Status management (active/inactive)
- Multi-tenant ready
- Laravel Passport/Sanctum authentication support
- Comprehensive API endpoints
- Policy-based authorization
- PSR-4 compliant
- Full test coverage
Installation
Install the package via Composer:
composer require litepie/integration
Publish the configuration and migrations:
php artisan vendor:publish --provider="Litepie\Integration\IntegrationServiceProvider"
Run the migrations:
php artisan migrate
Configuration
The package publishes a configuration file to config/integration.php where you can customize:
- Database table names
- Middleware settings
- Authentication guards
- Default settings
Usage
Creating an Integration
use Litepie\Integration\Models\Integration; $integration = Integration::create([ 'name' => 'My API Integration', 'description' => 'Integration for my application', 'redirect_uris' => ['https://myapp.com/callback'], 'status' => 'active', 'user_id' => auth()->id(), ]);
API Endpoints
The package provides RESTful API endpoints:
GET /api/integrations- List integrationsPOST /api/integrations- Create integrationGET /api/integrations/{id}- Show integrationPUT /api/integrations/{id}- Update integrationDELETE /api/integrations/{id}- Delete integration
Multi-tenant Support
The package automatically handles multi-tenancy by associating integrations with the authenticated user.
Testing
Run the test suite:
vendor/bin/phpunit
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-31