Laravel Diagnostic command for configuration, db connection, http request
LaraLens is a Laravel artisan command to show you the current configuration of your application. It is useful to show in your terminal the status of:
- some useful configuration variable;
- the database connection;
- the tables in the database;
- the connection via HTTP request.
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. So, in this scenario usually, as developer, your first question is: "how is configured the application?".
You can install the package via composer:
composer require hi-folks/lara-lens
The Packagist page is: https://packagist.org/packages/hi-folks/lara-lens
php artisan laralens:diagnostic
You can see Database Connection information, and you can choose the table to check, and the column used for the "order by" (default created_at):
php artisan laralens:diagnostic --table=migrations --column-sort=id
To take the last created user:
php artisan laralens:diagnostic --table=users --column-sort=created_at
To take the last updated user:
php artisan laralens:diagnostic --table=users --column-sort=updated_at
You can control the output via the show option. You can define:
- all The defalut for --show option is all.
php artisan laralens:diagnostic --show=config --show=connection --show=database --show=runtime --show=migration
If you want to see only database information:
php artisan laralens:diagnostic --show=database
You can choose one of these styles via --style= option:
php artisan laralens:diagnostic --style=borderless
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
- Take a look if your request is already there https://github.com/Hi-Folks/lara-lens/issues
- If it is not present, you can create a new one https://github.com/Hi-Folks/lara-lens/issues/new
The MIT License (MIT). Please see License File for more information.