Documentation is still in progress and subject to change.

Laravel Getting Started

1. Install

Use composer to install the taildev/laravel library.

composer require taildev/laravel

Set TAIL_AGENT_TOKEN environment variable in your .env file with the auth token you setup during the quickstart.

TAIL_AGENT_TOKEN=some-token

Laravel 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,
]

2. Logs

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.

3. Config

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.

4. Dive deeper

© 2020 tail.dev