1. Go to this page and download the library: Download binarcode/laravel-segment 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/ */
binarcode / laravel-segment example snippets
return [
/**
* The queue name where the segment events will be dispatched.
*/
'queue' => env('SEGMENT_QUEUE', env('QUEUE_CONNECTION', 'sync')),
/**
* Segment API key [see: https://segment.com/docs/connections/sources/catalog/libraries/server/php/#identify].
*/
'key' => env('SEGMENT_KEY', ''),
];