guljahang/swaglite
Composer 安装命令:
composer require guljahang/swaglite
包简介
Lightweight Swagger alternative for Laravel
README 文档
README
Lightweight API documentation for Laravel.
Features
- Interactive API documentation
- Execute API requests directly from the browser
- Path parameters (
/users/{id}) - JSON request bodies
- GET, POST, PUT, PATCH and DELETE support
- Search endpoints instantly
- Dark mode support
- Attribute-based documentation
- Lightweight and zero external dependencies
Installation
composer require guljahang/swaglite
Publish the package assets:
php artisan vendor:publish --tag=swaglite-assets
Access the Documentation
After installing the package, start your Laravel application and open:
http://localhost:8000/swaglite
Usage
Response Documentation
#[SwagResponse(
status: 200,
description: 'Success'
)]
public function index()
{
return User::all();
}
Path Parameters
#[SwagParameter(
name: 'id',
in: 'path',
required: true,
example: 1
)]
public function show($id)
{
return User::findOrFail($id);
}
Request Body
#[SwagParameter(
name: 'name',
in: 'body',
required: true
)]
#[SwagParameter(
name: 'email',
in: 'body',
required: true
)]
public function store(Request $request)
{
return $request->all();
}
Supported Methods
- GET
- POST
- PUT
- PATCH
- DELETE
Screenshots
Light Mode
Dark Mode
License
MIT
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-26

