// laravel-tinker-workflows

Inspect Laravel config and service container bindings

Use Tinker to read config values, resolve services, and confirm runtime bindings without adding temporary routes or debug controllers.

config July 28, 2026 9 min read Beginner
The result panel renders the returned config keys, values, and resolved service class as a structured array.

Direct answer

Use Tinker to inspect the config and service container values that Laravel actually booted with. In LaraBench, save the snippet and review its structured output in History.

When to use this

Use this when an app behaves differently between local, staging, and production, or when a binding changes after config cache, service provider changes, or package upgrades.

Terminal approach

Start with php artisan about, then inspect only the config keys and bindings you need. Avoid dumping full config arrays because they can contain secrets.

php artisan about
php artisan tinker --execute="dump(config('queue.default'));"

LaraBench approach

  • Open Run Code and choose the target app.
  • Paste the inspection snippet and run it in Tinker mode.
  • Save it as a snippet once the output is useful.
  • Use History later to compare the same keys across environments.

Snippet

use Illuminate\Contracts\Cache\Repository as CacheRepository;
use Illuminate\Support\Facades\App;

return [
    'app_env' => config('app.env'),
    'queue_default' => config('queue.default'),
    'cache_store' => config('cache.default'),
    'cache_class' => get_class(App::make(CacheRepository::class)),
];

Expected result

The result should be a small array with the runtime environment, queue driver, cache store, and concrete cache repository class. Those values are usually enough to spot a stale config cache or an unexpected binding.

Troubleshooting

  • If config values differ from .env, check whether the app is using cached config.
  • If a binding fails to resolve, confirm the package service provider is registered in this environment.
  • If output is too large, return a named array of specific keys instead of dumping full services.

Safety notes

Do not print secrets, tokens, mail credentials, private URLs, or entire config arrays into shared screenshots or saved history. Keep saved snippets limited to non-secret operational facts.

For higher-risk environments, pair this with the production safety workflow.

Run these checks in LaraBench.

The free app includes Run Code, Artisan commands, Docker and SSH connections, saved items, History, logs, and benchmarks.