{"id":20388608,"url":"https://github.com/efureev/laravel-action-events","last_synced_at":"2026-07-17T00:34:30.185Z","repository":{"id":90771351,"uuid":"391159622","full_name":"efureev/laravel-action-events","owner":"efureev","description":"Allows you to store various event actions: model changes, events, just strings","archived":false,"fork":false,"pushed_at":"2021-08-02T10:22:50.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T20:37:17.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/efureev.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":"2021-07-30T18:34:18.000Z","updated_at":"2025-06-20T08:05:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0532b19-64bf-43c9-80cb-e7d2fbea4a99","html_url":"https://github.com/efureev/laravel-action-events","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/efureev/laravel-action-events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-action-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-action-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-action-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-action-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efureev","download_url":"https://codeload.github.com/efureev/laravel-action-events/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-action-events/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280706873,"owners_count":26377002,"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-10-23T02:00:06.710Z","response_time":142,"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":[],"created_at":"2024-11-15T03:11:48.258Z","updated_at":"2025-10-23T23:15:45.206Z","avatar_url":"https://github.com/efureev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event log system\n\n## Information\n\nThis package allows you to store various event actions: model changes, events, just strings\n\n### Features\n\n- Keep `original` \u0026 `change` data\n- Keep `Extra` data\n- Store various value types: `String`, `Event`, `Model`\n- Has various event types:\n    - `Change` For change data Actions (Models: create/update/delete)\n    - `Event` For any Events in system (Login success/failed)\n    - `Read` For read data (Export data, etc)\n- Store an event with a model in one transaction\n- Has relations (through trait: `HasActions`) to the Eloquent Models: `$model-\u003eactions`\n- Has relation (through trait: `MadeActions`) to author user: `$user-\u003emadeActions`\n- Has statuses: `Done`, `Running`, `Failed`\n\n## Examples\n\nLog event from `String`\n\n```php\napp('actionEvents')-\u003epush('custom event');\n```\n\nLog event from Laravel `Event` with interface `Actionable`\n\n```php\nclass Login implements Actionable\n{\n    public function getName(): string\n    {\n        return 'login';\n    }\n}\n\n// ...\n\napp('actionEvents')-\u003epush(new Login());\n```\n\nLog event from Laravel `Event` wo interface `Actionable`\n\n```php\nclass CustomEvent\n{\n}\n\n// ...\n\napp('actionEvents')-\u003epush(new CustomEvent());\n```\n\nLog event from special class `ActionEvent` or other which implementing interface `ActionEventable`\n\n```php\napp('actionEvents')-\u003epush(new ActionEvent('event'));\napp('actionEvents')-\u003epush(ActionEvent::make('event')-\u003etypeRead());\napp('actionEvents')-\u003epush(new ActionEvent('event', ActionEventType::READ));\n```\n\nLog data change from Laravel Model: create\n\n```php\n$attributes = [\n// ...\n];\n$dataModel = User::create($attributes);\n$modelEvent = app('actionEvents')-\u003epushByModelCreate($dataModel);\n```\n\nLog data change from Laravel Model: update\n\n```php\n$attributes1 = [\n// ...\n];\n$dataModel = User::create([]);\n$dataModel-\u003efill(['name'=\u003e'test']);\n\n$modelEvent = app('actionEvents')-\u003epushByModelUpdate($dataModel);\n$dataModel-\u003esave();\n```\n\nor\n\n```php\n$attributes1 = [\n// ...\n];\n$dataModel = User::create([]);\n$dataModel-\u003efill(['name'=\u003e'test']);\n$changes = $dataModel-\u003egetDirty();\n$dataModel-\u003esave();\n\n$modelEvent = app('actionEvents')-\u003epushByModelUpdate($dataModel, $changes);\n```\n\nLog data change from Laravel Model with transaction: create\n\n```php\n$attributes1 = [\n// ...\n];\n$dataModel = User::create([]);\n$modelEvent = app('actionEvents')-\u003epushAndSaveByModelCreate($dataModel);\n```\n\nLog data change from Laravel Model with transaction: update\n\n```php\n$attributes1 = [\n// ...\n];\n$dataModel = User::create([]);\n$dataModel-\u003efill(['name'=\u003e'test']);\n$modelEvent = app('actionEvents')-\u003epushAndSaveByModelUpdate($dataModel);\n```\n\n### Work with collections\n\nTarget-models \u0026 ActionEvent-models store in `pushCollectionCreate` or `pushCollectionUpdate` through transactions.\n\nLog collections: create\n\n```php\n$staffModels = new Collection([Model::create(), Model::make(),'test', new Login(),Model::create()]);\n$models = app('actionEvents')-\u003epushCollectionCreate($staffModels);\n```\n\nIf target-model have not created, it will be store before its logging to actionEvent store to define its ID.\n\nLog collections: update\n\n```php\n$models = StuffFactory::times(10)-\u003ecreate();\n$models-\u003eeach(fn(Stuff $model) =\u003e $model-\u003esetAttribute('name', $model-\u003ename . ' (updated)'));\n\n// add other item types to store\n$models-\u003eadd('time');\n$models-\u003eadd(new Login());\n\n$eventModels = app('actionEvents')-\u003epushCollectionUpdate($models);\n```\n\nLog collections: delete\n\n```php\n$models = StuffFactory::times(10)-\u003ecreate();\n$models-\u003edelete();\n$eventModels = app('actionEvents')-\u003epushCollectionDelete($models);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Flaravel-action-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefureev%2Flaravel-action-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Flaravel-action-events/lists"}