PHPackages                             hi-folks/lara-lens - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. hi-folks/lara-lens

ActiveLibrary[Database &amp; ORM](/categories/database)

hi-folks/lara-lens
==================

Laravel Diagnostic command for configuration, db connection, http request

v1.0.1(1y ago)16665.5k↓17.8%171MITPHPPHP ^8.0|^8.1|^8.2|^8.3|^8.4

Since May 20Pushed 1y ago3 watchersCompare

[ Source](https://github.com/Hi-Folks/lara-lens)[ Packagist](https://packagist.org/packages/hi-folks/lara-lens)[ Docs](https://github.com/hi-folks/lara-lens)[ RSS](/packages/hi-folks-lara-lens/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (40)Used By (1)

LaraLens
========

[](#laralens)

[![CI/CD Github Actions](https://camo.githubusercontent.com/c05d1ffdb1fda78b046a88fa9b73dc090658a83202fd7ef93f01dcc88f11e2e7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68692d666f6c6b732f6c6172612d6c656e732f7068702d636f64652d7175616c6974792e796d6c3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/c05d1ffdb1fda78b046a88fa9b73dc090658a83202fd7ef93f01dcc88f11e2e7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68692d666f6c6b732f6c6172612d6c656e732f7068702d636f64652d7175616c6974792e796d6c3f7374796c653d666f722d7468652d6261646765)[![GitHub last commit](https://camo.githubusercontent.com/95c1a31b8427bff913e5471559e10532eacae68a6c56d50d62fba1edc31c453f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f68692d666f6c6b732f6c6172612d6c656e733f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/95c1a31b8427bff913e5471559e10532eacae68a6c56d50d62fba1edc31c453f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f68692d666f6c6b732f6c6172612d6c656e733f7374796c653d666f722d7468652d6261646765)[![GitHub Release Date](https://camo.githubusercontent.com/0015240482c6f1de6dadc0ed1266b5e3290e708eee43219175867f330f1f14ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f68692d666f6c6b732f6c6172612d6c656e733f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/0015240482c6f1de6dadc0ed1266b5e3290e708eee43219175867f330f1f14ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f68692d666f6c6b732f6c6172612d6c656e733f7374796c653d666f722d7468652d6261646765)[![Packagist PHP Version](https://camo.githubusercontent.com/45813afc86408d0a2e4960a333b60d41b72f68c8903d34cb9ba2baf9f5ba769c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68692d666f6c6b732f6c6172612d6c656e733f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/45813afc86408d0a2e4960a333b60d41b72f68c8903d34cb9ba2baf9f5ba769c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68692d666f6c6b732f6c6172612d6c656e733f7374796c653d666f722d7468652d6261646765)

[![LaraLens](https://raw.githubusercontent.com/Hi-Folks/lara-lens/develop/LaraLens-Laravel-Artisan.png)](https://raw.githubusercontent.com/Hi-Folks/lara-lens/develop/LaraLens-Laravel-Artisan.png)

What
----

[](#what)

**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;
- the server requirements (PHP version, PHP modules required and installed, Laravel version etc.).

[![LaraLens - diagnostic package for Laravel](https://camo.githubusercontent.com/bd1360257ac6a54d4fb64990debb7e41fb95fcf5e6b00b584735b2600bc95e0c/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f72796167707530717177677934373678357735622e676966)](https://camo.githubusercontent.com/bd1360257ac6a54d4fb64990debb7e41fb95fcf5e6b00b584735b2600bc95e0c/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f72796167707530717177677934373678357735622e676966)

Why
---

[](#why)

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?".

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require hi-folks/lara-lens
```

The Packagist page is:

Usage
-----

[](#usage)

```
php artisan laralens:diagnostic
```

### Usage: control database connection

[](#usage-control-database-connection)

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
```

### Usage: control the output

[](#usage-control-the-output)

You can control the output via the *show* option. You can define:

- config
- connection
- database
- runtime
- migration
- php-ext
- php-ini
- all

The default for *--show* option (if you avoid specifying *--show*) is to display: config, connection, database, runtime, migration.

```
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
```

If you want to see a verbose output (with also PHP extensions and PHP INI values):

```
php artisan laralens:diagnostic --show=all
```

or better:

```
php artisan laralens:diagnostic --all
```

If you want to see only PHP extensions:

```
php artisan laralens:diagnostic --show=php-ext
```

If you want to see only PHP INI values:

```
php artisan laralens:diagnostic --show=php-ini
```

### Usage: skip database connection and database diagnostics

[](#usage-skip-database-connection-and-database-diagnostics)

If your Laravel application doesn't use the database, you can skip the database inspection with --skip-database option.

```
php artisan laralens:diagnostic --skip-database
```

### Usage: show some oprating system information

[](#usage-show-some-oprating-system-information)

You can show some operating system information like:

- PHP script owner's UID
- Current User
- Operating System
- Hostname
- Release name
- Machine Name
- Version info

using *"--show os"* option or *"--show all"* option

```
php artisan laralens:diagnostic  --show os
```

### Usage: change the style of output table

[](#usage-change-the-style-of-output-table)

You can choose one of these styles via *--style=* option:

- default
- borderless
- compact
- symfony-style-guide
- box
- box-double

For example:

```
php artisan laralens:diagnostic --style=borderless
```

### Usage: change the width of the output table

[](#usage-change-the-width-of-the-output-table)

To use 120 characters (wide terminal), you can use --large option

```
php artisan laralens:diagnostic --large
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Usage as Web Page
-----------------

[](#usage-as-web-page)

LaraLens provides information with the command line via terminal as shown above. You have also the opportunity to see the information via your web browser. You can enable web view via the configuration.

Publish default configuration for LaraLens in your Laravel Application:

```
php artisan vendor:publish --provider="HiFolks\LaraLens\LaraLensServiceProvider" --tag="config"
```

After that,you will have a new configuration file in your config directory. The file is: config/lara-lens.php

Add `LARALENS_WEB_ENABLED=on` option to your .env file. You may also override the default parameters for `LARALENS_PREFIX` and `LARALENS_MIDDLEWARE`

```
# Wether Web Report should be enabled or not
LARALENS_WEB_ENABLED=on
# Path prefix in order to acess the Web Report via browser
LARALENS_PREFIX="laralens"
# Which middleware should be used when acessing the Web Report, separete more with ;
LARALENS_MIDDLEWARE="web;auth.basic"

```

For example, with the configuration above you would have enabled the web view (*web-enabled* parameter) under */laralens\_test/* path and with the `web` and `auth.basic` middleware

```
return [
    'prefix' => env('LARALENS_PREFIX', 'laralens'), // URL prefix (default=laralens)
    'middleware' => explode(';', env('LARALENS_MIDDLEWARE', 'web')), // middleware (default=web) more separate with ;
    'web-enabled' => env('LARALENS_WEB_ENABLED', 'off') // Activate web view (default=off)
];
```

### Web view configuration hint

[](#web-view-configuration-hint)

LaraLens shows some internal configuration of your Laravel application, so I suggest you to disable it in a production environment. To disable LaraLens web view, make sure to remove LARALENS\_WEB\_ENABLED config from .env file or set it to *off*

```
LARALENS_WEB_ENABLED=off

```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Submit ideas or feature requests or issues

[](#submit-ideas-or-feature-requests-or-issues)

- Take a look if your request is already there
- If it is not present, you can create a new one

Credits
-------

[](#credits)

- [Roberto Butti](https://github.com/hi-folks)
- [All Contributors](https://github.com/Hi-Folks/lara-lens/graphs/contributors)
- [Laravel Package Boilerplate](https://laravelpackageboilerplate.com)

Who talks about LaraLens
------------------------

[](#who-talks-about-laralens)

- [Laravel News](https://laravel-news.com/inspect-application-configuration-with-laralens)
- [Medium Article](https://levelup.gitconnected.com/laralens-a-laravel-command-for-inspecting-configuration-2bbb4e714cf7)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 91.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~44 days

Recently: every ~67 days

Total

38

Last Release

535d ago

Major Versions

v0.5.2 → v1.0.02024-03-13

PHP version history (7 changes)v0.1.0PHP ^7.2

v0.2.2PHP ^7.2|^8.0

v0.3.0PHP ^7.4|^8.0|^8.1

v0.3.1PHP ^8.0|^8.1

v0.4.0PHP ^8.0|^8.1|^8.2

v1.0.0PHP ^8.0|^8.1|^8.2|^8.3

v1.0.1PHP ^8.0|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe3f0e9f35a03ea055996e023bc25cfe408742fe9433f66858b714133da55313?d=identicon)[roberto](/maintainers/roberto)

---

Top Contributors

[![roberto-butti](https://avatars.githubusercontent.com/u/678434?v=4)](https://github.com/roberto-butti "roberto-butti (247 commits)")[![Zuruckt](https://avatars.githubusercontent.com/u/11967494?v=4)](https://github.com/Zuruckt "Zuruckt (7 commits)")[![JexPY](https://avatars.githubusercontent.com/u/9080830?v=4)](https://github.com/JexPY "JexPY (7 commits)")[![dansysanalyst](https://avatars.githubusercontent.com/u/79267265?v=4)](https://github.com/dansysanalyst "dansysanalyst (3 commits)")[![tweichart](https://avatars.githubusercontent.com/u/1303151?v=4)](https://github.com/tweichart "tweichart (2 commits)")[![martijnengler](https://avatars.githubusercontent.com/u/929994?v=4)](https://github.com/martijnengler "martijnengler (1 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")[![yrevanna](https://avatars.githubusercontent.com/u/71602500?v=4)](https://github.com/yrevanna "yrevanna (1 commits)")[![exodusanto](https://avatars.githubusercontent.com/u/13484843?v=4)](https://github.com/exodusanto "exodusanto (1 commits)")

---

Tags

databasediagnostic-toolhacktoberfestlaravellaravel-applicationlaravel-packagephp-librarycliconsolecommand-linelaravelpackagehi-folksdiagnosticlara-lens

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hi-folks-lara-lens/health.svg)

```
[![Health](https://phpackages.com/badges/hi-folks-lara-lens/health.svg)](https://phpackages.com/packages/hi-folks-lara-lens)
```

###  Alternatives

[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[nunomaduro/laravel-console-summary

A Beautiful Laravel Console Summary for your Laravel/Laravel Zero commands.

662.0M3](/packages/nunomaduro-laravel-console-summary)[nunomaduro/laravel-console-dusk

Laravel Console Dusk allows the usage of Laravel Dusk in Laravel/Laravel Zero artisan commands.

16255.4k7](/packages/nunomaduro-laravel-console-dusk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
