{"id":13828278,"url":"https://github.com/orisintel/laravel-process-stamps","last_synced_at":"2025-04-09T10:07:40.906Z","repository":{"id":32948871,"uuid":"147357130","full_name":"orisintel/laravel-process-stamps","owner":"orisintel","description":"Logs which process created or modified a record","archived":false,"fork":false,"pushed_at":"2022-02-10T15:09:13.000Z","size":86,"stargazers_count":96,"open_issues_count":2,"forks_count":6,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-09-19T11:06:13.873Z","etag":null,"topics":["database","hacktoberfest","laravel","logging","php","php7"],"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/orisintel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2018-09-04T14:14:07.000Z","updated_at":"2024-04-16T15:25:36.000Z","dependencies_parsed_at":"2022-08-07T19:00:08.142Z","dependency_job_id":null,"html_url":"https://github.com/orisintel/laravel-process-stamps","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisintel%2Flaravel-process-stamps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisintel%2Flaravel-process-stamps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisintel%2Flaravel-process-stamps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisintel%2Flaravel-process-stamps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orisintel","download_url":"https://codeload.github.com/orisintel/laravel-process-stamps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018060,"owners_count":21034048,"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":["database","hacktoberfest","laravel","logging","php","php7"],"created_at":"2024-08-04T09:02:39.521Z","updated_at":"2025-04-09T10:07:40.876Z","avatar_url":"https://github.com/orisintel.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Laravel Process Stamps\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/orisintel/laravel-process-stamps.svg?style=flat-square)](https://packagist.org/packages/orisintel/laravel-process-stamps)\n[![Build Status](https://img.shields.io/github/workflow/status/orisintel/laravel-process-stamps/tests?style=flat-square)](https://github.com/orisintel/laravel-process-stamps/actions?query=workflow%3Atests)\n[![Total Downloads](https://img.shields.io/packagist/dt/orisintel/laravel-process-stamps.svg?style=flat-square)](https://packagist.org/packages/orisintel/laravel-process-stamps)\n\nIt is sometimes very useful to know which process created or modified a particular record in your database. This package provides a trait to add to your Laravel models which automatically logs that for you.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require orisintel/laravel-process-stamps\n```\n\n## Configuration\n\n``` php\nphp artisan vendor:publish --provider=\"\\OrisIntel\\ProcessStamps\\ProcessStampsServiceProvider\"\n```\n\nRunning the above command will publish both the migration and the config file.\n\n## Usage\n\nAfter adding the proper fields to your table, add the trait to your model.\n\n``` php\n// User model\nclass User extends Model\n{\n    use ProcessStampable;\n\n```\n\nNext, create a migration for your table and include the following:\n\n```php\n$table-\u003eprocessIds();\n```\n\nTo specify your own foreign key or index names, include the following options:\n\n```php\n$table-\u003eprocessIds([\n    'created_index_name' =\u003e 'custom_created_index_name',\n    'updated_index_name' =\u003e 'custom_updated_index_name',\n    'created_foreign_key_name' =\u003e 'custom_created_foreign_key_name',\n    'updated_foreign_key_name' =\u003e 'custom_updated_foreign_key_name',\n    ]);\n```\n\nThat will generate the nessesary field names to track processes.\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n## Using Docker\nAll assets are set up under the docker-compose.yml file. The first time you run the docker image you must build it with \nthe following command:\n```bash\ndocker-compose build\n```\n\nThen you can bring it up in the background using:\n```bash\ndocker-compose up -d\n```\n\nAnd the image is aliased so you can access its command line via:\n```bash\ndocker exec -it processes-stamp-app /bin/bash\n```\n\nFrom there you can run the tests within an isolated environment\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email [opensource@orisintel.com](mailto:opensource@orisintel.com) instead of using the issue tracker.\n\n## Credits\n\n- [Tom Schlick](https://github.com/tomschlick)\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%2Forisintel%2Flaravel-process-stamps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forisintel%2Flaravel-process-stamps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forisintel%2Flaravel-process-stamps/lists"}