New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ion-bazan/laravel-container-debug

Lists available services in Laravel IoC Container. Works with Laravel 5.4-14.x
94,574 6
Install
composer require ion-bazan/laravel-container-debug
Latest Version:v1.8.0
PHP:>=7.0
Laravel:5 – 13
License:MIT
Last Updated:Oct 8, 2026
Links: GitHub  ·  Packagist
Maintainer: IonBazan

Laravel Container Debug command

Laravel 5.4 - 14.x Latest version GitHub Workflow Status PHP version Codecov Mutation testing badge Downloads License

Symfony-inspired package to list available services in Laravel IoC Container. Works with Laravel 5.4-14.x.

Example output

+--------------------------------------------------------------+-------------------------------------------------------------+--------+-------+
| Service ID                                                   | Class                                                       | Shared | Alias |
+--------------------------------------------------------------+-------------------------------------------------------------+--------+-------+
| IonBazan\Laravel\ContainerDebug\Tests\IContainerContractStub | IonBazan\Laravel\ContainerDebug\Tests\ContainerConcreteStub | No     | No    |
| IonBazan\Laravel\ContainerDebug\Tests\SingletonService       | IonBazan\Laravel\ContainerDebug\Tests\SingletonService      | Yes    | No    |
| alias.b                                                      | alias for "service.b"                                       | No     | Yes   |
| alias.c                                                      | alias for "service.c"                                       | No     | Yes   |
| service.a                                                    | IonBazan\Laravel\ContainerDebug\Tests\ServiceStubA          | No     | No    |
| service.b                                                    | IonBazan\Laravel\ContainerDebug\Tests\ServiceStubB          | No     | No    |
| service.c                                                    | IonBazan\Laravel\ContainerDebug\Tests\ServiceStubC          | No     | No    |
| service.d                                                    | N/A                                                         | No     | No    |
| simple.value.array                                           | <array> [10,20]                                             | No     | No    |
| simple.value.int                                             | <integer> 10                                                | No     | No    |
| simple.value.string                                          | <string> test                                               | No     | No    |
+--------------------------------------------------------------+-------------------------------------------------------------+--------+-------+

Installation

composer require --dev ion-bazan/laravel-container-debug

Thanks to Laravel's Package Auto-Discovery, you don't need to register the ServiceProvider.

Laravel without auto-discovery

If you don't use auto-discovery, add the Service Provider to the providers array in your config/app.php:

\IonBazan\Laravel\ContainerDebug\ServiceProvider::class,

Lumen

For Lumen, register the Service Provider in your bootstrap/app.php:

$app->register(\IonBazan\Laravel\ContainerDebug\ServiceProvider::class);

Usage

TL;DR: php artisan container:debug --help

Usage is pretty straightforward:

  • to list all services: php artisan container:debug
  • to check specific service: php artisan container:debug MyFooService
  • to list all tags with tagged services: php artisan container:debug --tags
  • to list all services with tag: php artisan container:debug --tag=foo

The command does it best to find the service you want by stripping slashes in service names and looking for any occurrences of given name in service names. For example, to display service.foo service information, simply use php artisan container:debug foo. If there are more services with the similar name, a prompt will be shown to choose the one you are looking for.

To get the class name of the service, it must be initialized. To check how much time it took for each service, you may use --profile option.

Related Packages

daylerees/container-debug

Inspect the Laravel IoC Container from Artisan.

2,842 57
frostrain/laravel-console-debug

Show debug informations in console

20,935 2
madnh/laravel-command-util

Utils for a laravel command class

146 1
pastuhov/php-exec-command

Simple php command executor with param binding.

207,759 25
asvae/laravel-api-tester

Api tester for Laravel Framework

137,355 355

Version History

Version Released PHP Laravel License
v1.8.0 >=7.0 >=5.4 <15.0 MIT
v1.7.0 >=7.0 ^5.4 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || ^13 MIT
v1.6.0 >=7.0 ^5.4 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 MIT
v1.5.0 >=7.0 ^5.4 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 MIT
v1.4.0 >=7.0 ^5.4 || ^6 || ^7 || ^8 || ^9 || ^10 MIT