{"id":22004786,"url":"https://github.com/expdev07/laravel-logsnag","last_synced_at":"2025-08-09T08:08:04.472Z","repository":{"id":56980526,"uuid":"473337950","full_name":"ExpDev07/laravel-logsnag","owner":"ExpDev07","description":"📱 Get a realtime feed of your Laravel project’s most important events using Logsnag. Push notifications straight to your phone too!","archived":false,"fork":false,"pushed_at":"2024-03-28T09:42:06.000Z","size":9255,"stargazers_count":14,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T17:33:30.576Z","etag":null,"topics":["laravel","logging","logsnag","notifications","push-notifications"],"latest_commit_sha":null,"homepage":"","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/ExpDev07.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"ko_fi":"ExpDev"}},"created_at":"2022-03-23T19:53:53.000Z","updated_at":"2024-03-01T22:00:32.000Z","dependencies_parsed_at":"2025-05-05T17:33:32.921Z","dependency_job_id":null,"html_url":"https://github.com/ExpDev07/laravel-logsnag","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpDev07%2Flaravel-logsnag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpDev07%2Flaravel-logsnag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpDev07%2Flaravel-logsnag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpDev07%2Flaravel-logsnag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExpDev07","download_url":"https://codeload.github.com/ExpDev07/laravel-logsnag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542666,"owners_count":21765004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["laravel","logging","logsnag","notifications","push-notifications"],"created_at":"2024-11-30T00:17:12.870Z","updated_at":"2025-05-05T17:33:46.842Z","avatar_url":"https://github.com/ExpDev07.png","language":"PHP","funding_links":["https://ko-fi.com/ExpDev","https://ko-fi.com/C1C510DUQ'"],"categories":[],"sub_categories":[],"readme":"\n# laravel-logsnag\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/expdev07/laravel-logsnag.svg?style=flat-square)](https://packagist.org/packages/expdev07/laravel-logsnag)\n[![Total Downloads](https://img.shields.io/packagist/dt/expdev07/laravel-logsnag.svg?style=flat-square)](https://packagist.org/packages/expdev07/laravel-logsnag)\n\nGet a realtime feed of your Laravel project’s most important events using [Logsnag](https://logsnag.com/). Supports push notifications straight to your \nphone. \n\n**Get notified:**\n1. In the [Logsnag dashboard](https://app.logsnag.com/dashboard).\n2. On your desktop/laptop (windows + macOS).\n3. On your phone (android + iOS).\n\n## Support me\n\nI create Open Source software in my spare time. If you wish to support me, consider buying me a coffee :).\n\n\u003cp\u003e\n\u003ca href='https://ko-fi.com/C1C510DUQ' target='_blank'\u003e\n\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Beta\n\nLogsnag is currently in beta mode, and you must join the waitlist in order to use it. However, they accept people \nfairly quickly. Join on their website here: [https://logsnag.com/](https://logsnag.com/).\n\n## Requirements\n\n* PHP 8+\n* Laravel 9\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require expdev07/laravel-logsnag\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"logsnag-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\n\u003c?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Logsnag.\n    |--------------------------------------------------------------------------\n    |\n    | Configure the Logsnag options.\n    |\n    */\n\n    /**\n     * The project name.\n     */\n    'project' =\u003e env('LOGSNAG_PROJECT', 'laravel'),\n\n    /**\n     * The API token.\n     */\n    'token' =\u003e env('LOGSNAG_TOKEN', ''),\n\n    /**\n     * A mapping of icons for logging.\n     */\n    'icons' =\u003e [\n        'DEBUG'     =\u003e 'ℹ️',\n        'INFO'      =\u003e 'ℹ️',\n        'NOTICE'    =\u003e '📌',\n        'WARNING'   =\u003e '⚠️',\n        'ERROR'     =\u003e '⚠️',\n        'CRITICAL'  =\u003e '🔥',\n        'ALERT'     =\u003e '🔔️',\n        'EMERGENCY' =\u003e '💀',\n    ],\n\n];\n```\n\nAdd the Logsnag channel to your logging config:\n\n```php\n'channels' =\u003e [\n    //...\n    'logsnag' =\u003e [\n        'driver'  =\u003e 'custom',\n        'via'     =\u003e ExpDev07\\Logsnag\\Logger\\LogsnagLogger::class,\n        'level'   =\u003e 'debug',\n        'project' =\u003e 'my-project',\n        'channel' =\u003e 'my-channel',\n        'notify'  =\u003e true,         \n    ],\n];\n```\n\n## Usage\n\nUsing logger:\n\n```php\nuse Illuminate\\Support\\Facades\\Log;\n \nLog::channel('logsnag')-\u003eemergency('There is an emergency! Please fix ASAP.');\n```\n\nUsing facade:\n\n```php\nuse ExpDev07\\Logsnag\\Facades\\Logsnag;\n \nLogsnag::log('my-channel', \n    event: 'New subscriber!', \n    description: 'Someone just subscribed to MySaaS Pro at $9.99', \n    icon: '🤑', \n    notify: true,\n);\n```\n\nUsing client:\n\n```php\nuse ExpDev07\\Logsnag\\Client\\LogsnagClient;\n\napp(LogsnagClient::class)-\u003elog(new LogsnagRequest(\n    project: 'project-name',\n    channel: 'channel',\n    event: 'Test event',\n    description: 'This is a description for test event',\n    icon: '😊',\n    notify: true,\n));\n```\n\n## Parameters\n\n* **project:** The logsnag project name.\n* **channel:** The channel to log in. Must be lowercase and hyphenated.\n* **event:** The event name.\n* **description:** The event description.\n* **icon:** Associate the log with an icon (emoji).\n* **notify:** Whether to send push notifications to devices.\n\nSee [Logsnag Log](https://sh4yy.notion.site/LogSnag-API-e942b03305c94d4fa72c8a3d24a0ad49#eb98c978cec841d0ab50d52be6eb9f80) route for more information.\n\n## Screenshots\n\nA log about a new subscriber in the Logsnag dashboard.\n\n\u003cimg src=\"https://raw.githubusercontent.com/ExpDev07/laravel-logsnag/main/.github/screenshots/dashboard_notification_1.png\" alt=\"Dashboard Notification 1\" /\u003e\n\nA log about an app emergency in the Logsnag dashboard.\n\n\u003cimg src=\"https://raw.githubusercontent.com/ExpDev07/laravel-logsnag/main/.github/screenshots/dashboard_notification_2.png\" alt=\"Dashboard Notification 2\" /\u003e\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [ExpDev07](https://github.com/ExpDev07)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpdev07%2Flaravel-logsnag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpdev07%2Flaravel-logsnag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpdev07%2Flaravel-logsnag/lists"}