{"id":36994355,"url":"https://github.com/vohinc/laravel-botanalytics","last_synced_at":"2026-01-13T23:46:34.933Z","repository":{"id":62545152,"uuid":"79917842","full_name":"vohinc/laravel-botanalytics","owner":"vohinc","description":"A Botanalytics Wrapper for Laravel","archived":false,"fork":false,"pushed_at":"2017-01-26T02:48:57.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-04T18:54:45.427Z","etag":null,"topics":["botanalytics","botanalytics-php","laravel","laravel-botanalytics","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vohinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-24T14:15:53.000Z","updated_at":"2018-11-19T15:21:07.000Z","dependencies_parsed_at":"2022-11-02T21:45:54.020Z","dependency_job_id":null,"html_url":"https://github.com/vohinc/laravel-botanalytics","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vohinc/laravel-botanalytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vohinc%2Flaravel-botanalytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vohinc%2Flaravel-botanalytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vohinc%2Flaravel-botanalytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vohinc%2Flaravel-botanalytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vohinc","download_url":"https://codeload.github.com/vohinc/laravel-botanalytics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vohinc%2Flaravel-botanalytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["botanalytics","botanalytics-php","laravel","laravel-botanalytics","php"],"created_at":"2026-01-13T23:46:34.806Z","updated_at":"2026-01-13T23:46:34.918Z","avatar_url":"https://github.com/vohinc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Botanalytics\n[![Build Status](https://travis-ci.org/vohinc/laravel-botanalytics.svg)](https://travis-ci.org/vohinc/laravel-botanalytics)\n[![StyleCI](https://styleci.io/repos/79917842/shield)](https://styleci.io/repos/79917842)\n\nA Botanalytics Wrapper for Laravel\n\n[Botanalytics](https://botanalytics.co/) is a bot analytics service, improves Human-to-Bot interaction.\n\n## Install\n### Composer\nTo get the latest version\n```shell\ncomposer require vohinc/laravel-botanalytics\n```\n\n### Add Provider\nInclude the provider within `config/app.php`\n```php\n'providers' =\u003e [\n    ...\n    Vohinc\\LaravelBotanalytics\\BotanalyticsServiceProvider::class,\n    ...\n]\n```\n\n### Publish Configuration\n```shell\nphp artisan vendor:publish --provider=Vohinc\\LaravelBotanalytics\\BotanalyticsServiceProvider --tag=config\n```\n## Config\n### Set Botanalytics Token\nAdd your botanalytics token to `.env`\n```\nBOTANALYTICS_TOKEN=botanalytics-token\n```\n\n## Usage\n\n### Incoming Message\n\n```php\n\u003c?php\nnamespace App;\n\nuse Vohinc\\LaravelBotanalytics\\BotanalyticsFacade;\nuse Closure;\n\nclass BotAnalyticsMiddleware\n{\n    /**\n         * Handle an incoming request.\n         *\n         * @param  \\Illuminate\\Http\\Request  $request\n         * @param  \\Closure  $next\n         * @return mixed\n         */\n        public function handle($request, Closure $next)\n        {\n            $body = $request-\u003eall();\n            if (array_get($body, 'object') === 'page') {\n                BotanalyticsFacade::facebook()-\u003erequest([\n                    'recipient' =\u003e null,\n                    'message' =\u003e $body,\n                ]);\n            }\n    \n            return $next($request);\n        }\n}\n\n```\n\n### Out-going Message\n```php\n\u003c?php\nnamespace App;\n\nuse Vohinc\\LaravelBotanalytics\\BotanalyticsFacade;\nuse Illuminate\\Http\\Request;\n\nclass WebhookController extends Controller\n{\n    public function request(Request $request)\n    {\n        $message = [\n            'recipient' =\u003e [\n                'id' =\u003e 'Sender ID',    \n            ],\n            'message' =\u003e [\n                'text' =\u003e 'hello, world!',    \n            ],\n        ];\n        \n        // response $message to Facebook\n        \n        // Send to botanalytics\n        BotanalyticsFacade::facebook()-\u003erequest([\n            'recipient' =\u003e array_get($message, 'recipient.id'),\n            'message' =\u003e array_get($message, 'message'),\n        ]);\n    }\n}\n\n```\n\n## License\nThis package is licensed under the [MIT license](https://github.com/vohinc/laravel-botanalytics/blob/master/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvohinc%2Flaravel-botanalytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvohinc%2Flaravel-botanalytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvohinc%2Flaravel-botanalytics/lists"}