50% off on Spike Billing!

Installing Log Viewer

Prerequisites

Here are the requirements for installing and using the Log Viewer.

  • PHP 8.0 or higher
  • Laravel 8 or higher

Installing the package via Composer

To install the package via composer, run:

composer require opcodesio/log-viewer

And publish the front-end assets by running:

php artisan log-viewer:publish

Once installed, the package is now ready to use! Just visit the /log-viewer route in your browser.

For example: http://my-app.test/log-viewer.

Publishing the configuration

If you would like to configure the route, or to include additional log files, you can publish the configuration file by running:

php artisan vendor:publish --tag="log-viewer-config"

You can then find the configuration file at config/log-viewer.php.

Deploying to production

By default, Log Viewer is not authorized in production (when the APP_ENV is set to production). This prevents accidental leaks of your logs in production.

In order to allow using Log Viewer in production, you must set up either viewLogViewer gate or use the LogViewer::auth($callback) method to configure authorization, as described in the Access to the Log Viewer page.

Next steps

After you have installed Log Viewer, here are some common next steps to learn:

Support

If you have any questions, feedback, or need any help setting up Log Viewer within your project, feel free to reach out via GitHub Discussions or GitHub Issues .