{"id":16315018,"url":"https://github.com/zingimmick/laravel-sentry","last_synced_at":"2025-07-19T23:10:22.565Z","repository":{"id":39995372,"uuid":"260966413","full_name":"zingimmick/laravel-sentry","owner":"zingimmick","description":"Provides sentry context middleware.","archived":false,"fork":false,"pushed_at":"2025-06-11T01:58:02.000Z","size":229,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"3.x","last_synced_at":"2025-06-11T02:47:44.760Z","etag":null,"topics":["laravel","sentry"],"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/zingimmick.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-05-03T15:57:45.000Z","updated_at":"2025-06-11T01:58:06.000Z","dependencies_parsed_at":"2023-02-17T09:30:46.135Z","dependency_job_id":"9b94ab67-e9d9-479b-bf9b-9f4d34871eab","html_url":"https://github.com/zingimmick/laravel-sentry","commit_stats":{"total_commits":184,"total_committers":6,"mean_commits":"30.666666666666668","dds":0.3532608695652174,"last_synced_commit":"bdc6a787284b5e68c105b8b057dc00bca7a1c09e"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/zingimmick/laravel-sentry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingimmick%2Flaravel-sentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingimmick%2Flaravel-sentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingimmick%2Flaravel-sentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingimmick%2Flaravel-sentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zingimmick","download_url":"https://codeload.github.com/zingimmick/laravel-sentry/tar.gz/refs/heads/3.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingimmick%2Flaravel-sentry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266039013,"owners_count":23867815,"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","sentry"],"created_at":"2024-10-10T21:55:52.053Z","updated_at":"2025-07-19T23:10:22.537Z","avatar_url":"https://github.com/zingimmick.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Sentry\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/zingimmick/laravel-sentry/actions\"\u003e\u003cimg src=\"https://github.com/zingimmick/laravel-sentry/actions/workflows/tests.yml/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/zingimmick/laravel-sentry\"\u003e\u003cimg src=\"https://codecov.io/gh/zingimmick/laravel-sentry/branch/master/graph/badge.svg\" alt=\"Code Coverage\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/zing/laravel-sentry\"\u003e\u003cimg src=\"https://poser.pugx.org/zing/laravel-sentry/v/stable.svg\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/zing/laravel-sentry\"\u003e\u003cimg src=\"https://poser.pugx.org/zing/laravel-sentry/downloads\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/zing/laravel-sentry\"\u003e\u003cimg src=\"https://poser.pugx.org/zing/laravel-sentry/v/unstable.svg\" alt=\"Latest Unstable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/zing/laravel-sentry\"\u003e\u003cimg src=\"https://poser.pugx.org/zing/laravel-sentry/license\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://scrutinizer-ci.com/g/zingimmick/laravel-sentry\"\u003e\u003cimg src=\"https://scrutinizer-ci.com/g/zingimmick/laravel-sentry/badges/quality-score.png\" alt=\"Scrutinizer Code Quality\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codeclimate.com/github/zingimmick/laravel-sentry/maintainability\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/5a95a074bcd38fd38da0/maintainability\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### Requirements\n\n- [PHP 8.0+](https://php.net/releases/)\n- [Composer](https://getcomposer.org)\n- [Laravel 8.0+](https://laravel.com/docs/releases)\n\nRequire Laravel Sentry using [Composer](https://getcomposer.org):\n\n```bash\ncomposer require zing/laravel-sentry\n```\n\n## Usage\n\n### Add user context\n\n```php\nuse Zing\\LaravelSentry\\Middleware\\SentryContext;\nuse Illuminate\\Foundation\\Http\\Kernel as HttpKernel;\n\nclass Kernel extends HttpKernel\n{\n    protected $middleware = [\n        // ...\n        SentryContext::class,\n    ];\n\n    // ...\n}\n```\n\n### Custom user context\n\n```php\nuse Zing\\LaravelSentry\\Middleware\\SentryContext;\n\nclass CustomSentryContext extends SentryContext\n{\n    /**\n     * @param \\Zing\\LaravelSentry\\Tests\\User $user\n     *\n     * @return array\u003cstring, mixed\u003e|mixed[]\n     */\n    protected function resolveUserContext(string $guard, \\Illuminate\\Contracts\\Auth\\Authenticatable $user): array\n    {\n        if ($guard === 'api') {\n            return [\n                'id' =\u003e $user-\u003egetAuthIdentifier(),\n                'username' =\u003e $user-\u003eusername,\n            ];\n        }\n\n        return parent::resolveUserContext($guard, $user);\n    }\n}\n```\n\n## License\n\nLaravel Sentry is an open-sourced software licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzingimmick%2Flaravel-sentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzingimmick%2Flaravel-sentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzingimmick%2Flaravel-sentry/lists"}