suman98 / laravel-api-debug-with-user
A standalone web UI to test internal Laravel API routes as any authenticated user.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/suman98/laravel-api-debug-with-user
Requires
- php: >=7.4
- vlucas/phpdotenv: ^5.6
This package is auto-updated.
Last update: 2026-02-19 08:32:38 UTC
README
A standalone web UI to test internal Laravel API routes as any authenticated user — without Postman, curl, or writing test code.
Features
- 🚀 Call any internal Laravel route (GET, POST, PUT, PATCH, DELETE)
- 🔐 Authenticate as any user by ID
- 📝 JSON or Key-Value payload editor
- 🎨 Dark / Light theme with persistence
- 📋 Multiple request cards with localStorage persistence
- 🖥️ Fullscreen response viewer with JSON syntax highlighting
- 📄 HTML error page rendering (iframe preview)
Installation
Option 1 — Clone & Run (standalone)
git clone https://github.com/suman98/laravel-api-debug-with-user.git
cd laravel-api-debug-with-user
composer install
cp .env.example .env
Edit .env and set the path to your Laravel project:
LARAVEL_PROJECT_PATH=/path/to/your/laravel/project
Start the server:
php bin/serve
# or with custom host/port:
php bin/serve 0.0.0.0 9000
Open http://localhost:8089 in your browser.
Option 2 — Install via Composer
composer require suman98/laravel-api-debug-with-user --dev
Create a .env in your project root (or wherever you run the command from):
LARAVEL_PROJECT_PATH=/path/to/your/laravel/project
Run the built-in server:
./vendor/bin/serve
Project Structure
├── bin/
│ └── serve # CLI dev server script
├── public/
│ └── index.php # Web UI entry point
├── src/
│ ├── Bootstrap.php # Laravel bootstrapper (loads .env + app)
│ └── InternalApiCaller.php # API caller class
├── .env.example
├── composer.json
└── readme.md
How It Works
- The tool bootstraps your external Laravel application using the path from
LARAVEL_PROJECT_PATH. - It authenticates as any user via
Auth::setUser(). - It dispatches an internal
Requestthrough Laravel's HTTP kernel. - The response (JSON or HTML) is rendered in the browser.
The User model is resolved automatically from your Laravel project's config('auth.providers.users.model') — no hardcoded model references.
Requirements
- PHP >= 7.4
- A Laravel project (any version with HTTP Kernel)
- Composer
License
MIT