{"id":36976222,"url":"https://github.com/cgdsoftware/versioning","last_synced_at":"2026-01-13T22:10:18.881Z","repository":{"id":65536922,"uuid":"531137666","full_name":"cgdsoftware/versioning","owner":"cgdsoftware","description":"Prevents update conflicts in Laravel","archived":false,"fork":true,"pushed_at":"2023-05-14T20:06:02.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-07T03:37:32.677Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.laravel-enso.com/packages/versioning.html","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"laravel-enso/versioning","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgdsoftware.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}},"created_at":"2022-08-31T15:09:42.000Z","updated_at":"2023-01-27T23:09:56.000Z","dependencies_parsed_at":"2023-02-15T13:10:42.223Z","dependency_job_id":null,"html_url":"https://github.com/cgdsoftware/versioning","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/cgdsoftware/versioning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdsoftware%2Fversioning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdsoftware%2Fversioning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdsoftware%2Fversioning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdsoftware%2Fversioning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgdsoftware","download_url":"https://codeload.github.com/cgdsoftware/versioning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgdsoftware%2Fversioning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-13T22:10:18.173Z","updated_at":"2026-01-13T22:10:18.875Z","avatar_url":"https://github.com/cgdsoftware.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Versioning\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/1d5b542a2d014afea54a5bcf315e0d9c)](https://www.codacy.com/gh/laravel-enso/versioning?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=laravel-enso/versioning\u0026amp;utm_campaign=Badge_Grade) \n[![StyleCI](https://github.styleci.io/repos/134861936/shield?branch=master)](https://github.styleci.io/repos/134861936)\n[![License](https://poser.pugx.org/laravel-enso/versioning/license)](https://packagist.org/packages/laravel-enso/versioning)\n[![Total Downloads](https://poser.pugx.org/laravel-enso/versioning/downloads)](https://packagist.org/packages/laravel-enso/versioning)\n[![Latest Stable Version](https://poser.pugx.org/laravel-enso/versioning/version)](https://packagist.org/packages/laravel-enso/versioning)\n\nPrevents update conflicts using the optimistic lock pattern in Laravel\n\nThis package can work independently of the [Enso](https://github.com/laravel-enso/Enso) ecosystem.\n\nFor live examples and demos, you may visit [laravel-enso.com](https://www.laravel-enso.com)\n\n## Installation\n\n1. install the package `composer require laravel-enso/versioning` \n2. run the migrations\n3. use the `Versionable` trait on the models you want versioning on.\n\nBy default, the version value is kept in a 'version' attribute, but this can be customized (see below).\n\n## Features\n\n- the package creates a `versionings` table where it holds versions for all the versionable models\n- by using the `Versionable` trait on a model, versioning is handled automatically\n- by default the trait appends a `version` attribute after the model is retrieved, used for tracking versions and expects the same attribute to be present on the model when the update is called\n- the default versioning attribute can be customized by using `protected $versioningAttribute = 'customVersionAttribte'` on the model\n- the trait can be used on models that already have records in the database, the versioning starts with the first retrieval of those models\n- when a versionable model is deleted, its versioning is deleted also. If the model uses `SoftDeletes`, the versioning is not deleted, unless doing a `forceDelete`\n- throws a `ConflictHttpException` if the version does not match on update\n- tests are included with the package\n\n## Configuration \u0026 Usage\n\nBe sure to check out the full documentation for this package available at [docs.laravel-enso.com](https://docs.laravel-enso.com/backend/versioning.html)\n\n## Contributions\n\nare welcome. Pull requests are great, but issues are good too.\n\n## License\n\nThis package is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgdsoftware%2Fversioning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgdsoftware%2Fversioning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgdsoftware%2Fversioning/lists"}