
Today now in this tutorials, I will show you how to install log viewer package in laravel 8 application.
Here we can simply and easy to logviewer package in our laravel 8 application.
Laravel provides us log file that will store all runtime error exception or also any other error that get, so we can view all log file better by using LogViewer composer package. Here laravel store very logs on a log file. So now if it occurs any error, warning, alert etc that time it store in laravel log file. But it will store in error format, So here we can make it readable format now and also know how much error with a description. Now we can resolve it and then make it a better web application.
So we have to just need to install LogViewer package and all configurations so that we can customize LogViewer package. Now let’s start to install and configuration of LogViewer package.
Installation Of LogViewer Package:
Now we need to install LogViewer composer package by using following command in our laravel application. So just let’s run bellow command.
composer require arcanedev/log-viewer
that’s good , after successfully install package, we need to check to app.php configuration file.
config/app.php
Publish the Config and Translations Files
php artisan log-viewer:publish
To force publishing
php artisan log-viewer:publish --force
Publishing the config only
php artisan log-viewer:publish --tag=config
Publishing the translations only
php artisan log-viewer:publish --tag=lang
Application requirements & log files check
php artisan log-viewer:check
Configuration Of Laravel Log:
now by default we have “stack” value in LOG_CHANNEL variable on our env file for log. So we need to change value stack into daily, so our package will display every day log. So let’s change it:
.env
LOG_CHANNEL=daily
So now we are ready to to run this package. Now let’s run our example so run bellow command for quick run
php artisan serve
Open following URL:
http://localhost:8000/log-viewer
You will get layout like as bellow:



Read Also : Laravel 8 Mobile Number Verification Tutorial
I hope it will help you. Also you can follow us on Facebook