### Run Laravel LogSnag Install Command Source: https://github.com/hosmelq/laravel-logsnag/blob/main/README.md Execute the dedicated LogSnag install command for a streamlined setup process, which may include publishing configurations. ```sh php artisan logsnag:install ``` -------------------------------- ### Install Laravel LogSnag Package Source: https://github.com/hosmelq/laravel-logsnag/blob/main/README.md Install the Laravel LogSnag package into your project using Composer. ```sh composer require hosmelq/laravel-logsnag ``` -------------------------------- ### Configure LogSnag API Credentials in .env Source: https://github.com/hosmelq/laravel-logsnag/blob/main/README.md Set your LogSnag API token and project name in the application's .env file. These environment variables are crucial for authenticating with the LogSnag API and specifying the target project for events. ```dosini LOGSNAG_API_TOKEN=your-api-token LOGSNAG_PROJECT=your-project-name ``` -------------------------------- ### Publish Laravel LogSnag Configuration File Source: https://github.com/hosmelq/laravel-logsnag/blob/main/README.md Publish the LogSnag configuration file to your application's config directory, allowing for custom adjustments to the package settings. ```sh php artisan vendor:publish --tag="logsnag-config" ``` -------------------------------- ### Publish LogSnag Insight using Facade Source: https://github.com/hosmelq/laravel-logsnag/blob/main/README.md Publish an insight to LogSnag using the LogSnag facade. Include an icon, title, and a numerical value for the insight. This method returns an Insight instance for accessing the API response. ```php use HosmelQ\LogSnag\Laravel\Facades\LogSnag; LogSnag::insight()->publish([ 'icon' => '🎉', 'title' => 'Registered Users on Waitlist', 'value' => 8 ]); ``` -------------------------------- ### Publish LogSnag Event using Helper Function Source: https://github.com/hosmelq/laravel-logsnag/blob/main/README.md Publish a custom event to LogSnag using the convenient `logsnag()` helper function. Specify the channel, event name, and an optional icon for the event. ```php logsnag()->log()->publish([ 'channel' => 'waitlist', 'event' => 'User Joined Waitlist', 'icon' => '🎉' ]); ``` -------------------------------- ### Publish LogSnag Event using Facade Source: https://github.com/hosmelq/laravel-logsnag/blob/main/README.md Publish a custom event to LogSnag using the LogSnag facade. Specify the channel, event name, and an optional icon. This method returns a Log instance providing access to the API response. ```php use HosmelQ\LogSnag\Laravel\Facades\LogSnag; LogSnag::log()->publish([ 'channel' => 'waitlist', 'event' => 'User Joined Waitlist', 'icon' => '🎉' ]); ``` -------------------------------- ### Identify User Properties with LogSnag Facade Source: https://github.com/hosmelq/laravel-logsnag/blob/main/README.md Identify and publish user properties to LogSnag using the LogSnag facade. Associate custom data like email, name, and plan with a specific user ID. This method returns an Identify instance for the API response. ```php use HosmelQ\LogSnag\Laravel\Facades\LogSnag; LogSnag::identify()->publish([ 'properties' => [ 'email' => 'john@doe.com', 'name' => 'John Doe', 'plan' => 'premium' ], 'user_id' => '123' ]); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.