muammarsiddiqui / apideck-laravel
Lightweight, beautiful, zero-config API playground and explorer for Laravel APIs
Package info
github.com/MuammarSiddiqui/apideck-laravel
Language:JavaScript
pkg:composer/muammarsiddiqui/apideck-laravel
Requires
- php: >=8.0
- illuminate/http: ^9.0|^10.0|^11.0|^12.0
- illuminate/routing: ^9.0|^10.0|^11.0|^12.0
- illuminate/support: ^9.0|^10.0|^11.0|^12.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Lightweight, beautiful, zero-config API playground and explorer for Laravel APIs.
ApiDeck automatically inspects your Laravel routes and controllers to generate a stunning UI allowing you to browse, test, and document your API without writing manual OpenAPI YAML files or docblocks.
β¨ What's New in v5.0
- π» Multi-Language Code Generator: Generate native code snippets in JavaScript (
fetch,axios), PHP (Guzzle,cURL), and C# (HttpClient). - π Request History Log: View past executions with status badges (
200 OK,404), latency metrics, and 1-click execution replay. - β‘ Performance Load Tester: Built-in Stress Benchmarker (10, 50, 100 requests) with average latency, P95/P99 calculations, and visual latency chart.
- π¦ Postman v2.1 & OpenAPI Import/Export: 1-click Postman v2.1 Collection export + external OpenAPI / Postman spec importer.
- πΊοΈ Interactive Node Visualizer: SVG canvas graph mapping API routes, feature groups, and schemas.
- π€ Dual Sorting: Sort collections and endpoints alphabetically (
A-Z/Z-A). - πΎ Full State Retention: Preserves parameter inputs, body text, and response results when switching endpoints.
Installation
Install the package via Composer:
composer require muammarsiddiqui/apideck-laravel
Because of Laravel's package auto-discovery, the service provider will be registered automatically!
Quick Start
Simply define your routes in routes/api.php or routes/web.php:
Route::prefix('api/v1')->group(function () { Route::get('users', [UserController::class, 'index']); Route::post('users', [UserController::class, 'store']); });
Then open http://localhost:8000/apideck in your browser!
(Note: ApiDeck automatically filters out routes that don't belong to your API to keep the interface clean).
Advanced: Dynamic Schema Reflection (Auto-Example Generation)
ApiDeck features a powerful PHP Reflection engine. To auto-generate Example JSON payloads and field schemas in the UI for your POST/PUT requests, strongly type-hint your controller methods or route closures:
Using a DTO / Class
class CreateUserDTO { public string $name; public string $email; public int $age; public bool $isActive; } Route::post('api/users', function (CreateUserDTO $payload) { return response()->json(['success' => true]); });
Using Form Requests
namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class StoreUserRequest extends FormRequest { public function rules() { return [ 'name' => 'required|string', 'email' => 'required|email' ]; } } public function store(StoreUserRequest $request) { // ... }
Configuration (Optional)
If you need to change the base URL or other behavior, publish the config file:
php artisan vendor:publish --provider="ApiDeck\Laravel\ApiDeckServiceProvider"
License
MIT License