Use composer to install the taildev/laravel library.
composer require taildev/laravelSet TAIL_AGENT_TOKEN environment variable in your .env file with the auth token you setup during the quickstart.
TAIL_AGENT_TOKEN=some-tokenLaravel will autoload the service provider by default, but if you have autoloading turned off be sure to manually add the service provider to config/app.php in the providers array.
'providers' => [
// ...,
Tail\Laravel\TailServiceProvider::class,
]Setup a log channel in config/logging.php under channels, add
'channels' => [
'tail' => [
'driver' => 'monolog',
'handler' => Tail\Logs\TailMonologHandler::class,
],
]Next, either add tail to the stack logging provider channels, or set LOG_CHANNEL=tail in your .env file.
By default the Laravel integration works out of the box with sensible defaults. If you'd like you may publish and customize configuration
php artisan vendor:publish --provider="Tail\Laravel\TailServiceProvider"then edit the config/tail.php file.