{"id":23858977,"url":"https://github.com/coloredcow/laravel-audit","last_synced_at":"2025-09-08T06:31:10.819Z","repository":{"id":46770680,"uuid":"102099671","full_name":"ColoredCow/laravel-audit","owner":"ColoredCow","description":"Audit Logs for Laravel applications","archived":false,"fork":false,"pushed_at":"2025-02-15T15:38:27.000Z","size":39,"stargazers_count":4,"open_issues_count":7,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-30T16:49:04.957Z","etag":null,"topics":["audit","audit-log","composer-package","laravel","laravel-application","listen"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ColoredCow.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-01T09:56:43.000Z","updated_at":"2025-02-15T15:38:30.000Z","dependencies_parsed_at":"2024-12-10T07:30:51.919Z","dependency_job_id":"83d0cbb8-afe4-408a-9ced-4c31af5fb611","html_url":"https://github.com/ColoredCow/laravel-audit","commit_stats":{"total_commits":32,"total_committers":7,"mean_commits":4.571428571428571,"dds":0.65625,"last_synced_commit":"4132f748b241e49e61a657cdb8a66b6fbf51a494"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ColoredCow/laravel-audit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColoredCow%2Flaravel-audit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColoredCow%2Flaravel-audit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColoredCow%2Flaravel-audit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColoredCow%2Flaravel-audit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColoredCow","download_url":"https://codeload.github.com/ColoredCow/laravel-audit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColoredCow%2Flaravel-audit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274145949,"owners_count":25230114,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["audit","audit-log","composer-package","laravel","laravel-application","listen"],"created_at":"2025-01-03T03:28:58.185Z","updated_at":"2025-09-08T06:31:10.569Z","avatar_url":"https://github.com/ColoredCow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Audit Logs for Laravel\r\n\r\nA package to capture system activity in a Laravel application. Currently supports the following fields:\r\n- IP of HTTP request,\r\n- HTTP referer,\r\n- a description of the action you want to audit.\r\n- user id\r\n- Other details like data and keys\r\n\r\n## Installation\r\n\r\n1. Run `composer require coloredcow/laravel-audit`\r\n2. Add the `ColoredCow\\LaravelAudit\\AuditServiceProvider` to `config/app.php`\r\n```\r\n'providers' =\u003e [\r\n    ColoredCow\\LaravelAudit\\AuditServiceProvider::class\r\n];\r\n```\r\n3. Run `php artisan migrate`\r\n\r\n\r\n## Usage\r\n\r\n1. Use the `ColoredCow\\LaravelAudit\\Events\\Auditable` trait in the events you want to audit. And add this to the contructor of the event.\r\n```\r\n$this-\u003esetAudit([\r\n    'ip' =\u003e 'ip-of-user-here',\r\n    'referer' =\u003e 'referer-address',\r\n    'action' =\u003e 'description of event and action being audited'\r\n]);\r\n```\r\n2. Use the `ColoredCow\\LaravelAudit\\Listeners\\AuditActivities` listener to listen to the events to want to audit. Map it in the EventServiceProvider of your laravel application.\r\n\r\n## Audit Facade\r\n\r\n1. Add AuditFacade in your app to make a audit directly from the applications.\r\n\r\n```\r\n AuditFacade::make(['action' =\u003e 'Audit Action']);\r\n```\r\n2. You can also overide other properties like ip, userid and descriptions.\r\n\r\n```\r\n AuditFacade::make(['action' =\u003e 'Audit Action', 'ip' =\u003e 'My IP']);\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoloredcow%2Flaravel-audit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoloredcow%2Flaravel-audit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoloredcow%2Flaravel-audit/lists"}