Add Log Lens to a Laravel app
Get a Log Lens dashboard inside your existing Laravel application in a few minutes.
1. Install the package
composer require cliqthemes/log-lens
php artisan vendor:publish --tag=log-lens-assets
Requires PHP 8.2+ and Laravel 10, 11, or 12. The package is auto-discovered and the UI ships pre-built - no Node build needed.
2. Open the dashboard
Visit /log-lens on your app. You'll see an empty workspace stored under
storage/log-lens/ - nothing else in your app is touched.
3. Decide who can access it
By default the dashboard is open in local and blocked everywhere else. Before
you rely on it, set an access rule in app/Providers/AppServiceProvider.php:
use LogLens\Laravel\LogLens;
public function boot(): void
{
LogLens::auth(fn ($request) => $request->user() !== null); // any logged-in user
}
See Require login or an API key for role/permission rules.
4. Load some logs
php artisan log-lens:import storage/logs
Refresh the dashboard - your errors and warnings are now grouped into issues.
Next
- Automate log syncing
- Pull logs from another server
- Full reference: Laravel Package