Search by

muammarsiddiqui / apideck-laravel

MuammarSiddiqui

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

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

5.0.0 2026-08-16 07:48 UTC

This package is auto-updated.

Last update: 2026-09-16 08:00:02 UTC


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