1. Go to this page and download the library: Download lostlink/laravel-messenger 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/ */
use \Lostlink\Messenger\Messenger;
Messenger::send([
"timestamp" => "2022-10-27T11:43:02.099Z",
"transaction_id" => "8d1e1533-6071-4b10-9cda-b8429c1c7a67",
"name" => "Bobby Drake",
"email" => "[email protected]",
"age" => 42,
"passport_number" => 3847665,
"flight_from" => "Barcelona",
"flight_to" => "London",
"extra_bags" => 1,
"flight_class" => "economy",
"priority_boarding" => false,
"meal_choice" => "vegetarian",
"seat_number" => "15D",
"airline" => "Red Balloon"
])
->driver('tinybird') // Change the driver to "tinybird" for this message
->config([
'name' => 'example_events', // Change the data source name to "example_events" for this message
'token' => 'your_token', // Change the token for this message
'endpoint' => 'https://api.us-east.aws.tinybird.co/v0/events', // Change the endpoint for this message
'rate_limit' => [
'enabled' => true, // Enable rate limiting for this message to use Tinybird Free Tier @ 1000/day
'max_attempts' => 40, // Set the maximum number of attempts before rate limiting is enforced
'decay_seconds' => 3600, // Set the number of seconds before the rate limit resets
],
]);