1. Go to this page and download the library: Download spatie/laravel-tail library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
spatie / laravel-tail example snippets
return [
'production' => [
/*
* The host that contains your logs.
*/
'host' => env('TAIL_HOST_PRODUCTION', ''),
/*
* The user to be used to SSH to the server.
*/
'user' => env('TAIL_USER_PRODUCTION', ''),
/*
* The path to the directory that contains your logs.
*/
'log_directory' => env('TAIL_LOG_DIRECTORY_PRODUCTION', ''),
/*
* The filename of the log file that you want to tail.
* Leave null to let the package automatically select the file.
*/
'file' => env('TAIL_LOG_FILE_PRODUCTION', null),
],
];