Inspect Application Configuration with LaraLens

News

July 30th, 2020

Inspect Application Configuration with LaraLens

LaraLens is a package by Roberto Butti to show you the current configuration of your application. You can get the following details from an Artisan command:

  • Lists useful configuration variables
  • Database connection details
  • Tables in the database
  • The connection via HTTP request

The package author explains his reasoning for creating this package in the readme:

When I have a new Laravel Application deployed on the target server, usually I perform a list of commands in order to check the configuration, the connection to database, inspect some tables, the response of the web server. I tried to show more information in just one command. This is useful also when the installation of your Laravel application is on premises, and someone else takes care about the configuration.

You can visualize all this information via the package’s artisan command. It has the following options:

# Run all diagnostics
php artisan laralens:diagnostic
 
# All available options
php artisan laralens:diagnostic \
--show=config \
--show=connection \
--show=database \
--show=runtime \
--show=migration
 
# If you only want to show the database info
php artisan laralens:diagnostic --show=database

You can learn more about this package, get full installation instructions, and view the source code on GitHub at Hi-Folks/lara-lens.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.