{"id":33997332,"url":"https://github.com/balismatz/filament-prevent-outdated-record-update","last_synced_at":"2026-01-18T02:38:04.404Z","repository":{"id":326871476,"uuid":"1107867506","full_name":"balismatz/filament-prevent-outdated-record-update","owner":"balismatz","description":"A Filament plugin that prevents users from updating outdated records.","archived":false,"fork":false,"pushed_at":"2026-01-17T09:52:29.000Z","size":17,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"5.x","last_synced_at":"2026-01-17T20:53:47.788Z","etag":null,"topics":["filament","filament-plugin","filamentphp","filamentphp-plugin","laravel","laravel-package"],"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/balismatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-01T17:58:42.000Z","updated_at":"2026-01-17T09:51:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/balismatz/filament-prevent-outdated-record-update","commit_stats":null,"previous_names":["balismatz/filament-prevent-outdated-record-update"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/balismatz/filament-prevent-outdated-record-update","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balismatz%2Ffilament-prevent-outdated-record-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balismatz%2Ffilament-prevent-outdated-record-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balismatz%2Ffilament-prevent-outdated-record-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balismatz%2Ffilament-prevent-outdated-record-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balismatz","download_url":"https://codeload.github.com/balismatz/filament-prevent-outdated-record-update/tar.gz/refs/heads/5.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balismatz%2Ffilament-prevent-outdated-record-update/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["filament","filament-plugin","filamentphp","filamentphp-plugin","laravel","laravel-package"],"created_at":"2025-12-13T08:56:38.154Z","updated_at":"2026-01-18T02:38:04.396Z","avatar_url":"https://github.com/balismatz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filament Prevent Outdated Record Update\n\nA Filament plugin that prevents users from updating outdated records.\n\nWhen an outdated record is detected, the update process is stopped and a\nnotification is shown to the user.\n\nA record is considered *outdated* when it has been modified more recently by\nanother user or when its changes have already been saved. This check is\nperformed based on the ```updated_at``` attribute.\n\n## Requirements\n\n- PHP 8.2 or higher\n- Laravel 11.28 or higher\n- Filament 5\n\n## Installation\n\nRequire the package using Composer:\n\n```shell\ncomposer require balismatz/filament-prevent-outdated-record-update:\"^5.0\"\n```\n\n### Translate the notification\n\nCurrently, the notification text is available in English (en) and Greek (el).\n\nIf you want to add your own translations or customize the existing ones, publish\nthe language files:\n\n```shell\nphp artisan vendor:publish --provider=\"BalisMatz\\FilamentPreventOutdatedRecordUpdate\\FilamentPreventOutdatedRecordUpdateServiceProvider\"\n```\n\n*Pull requests for additional language translations are welcome.*\n\n## Usage\n\n### Edit action\n\nTo prevent outdated record updates on edit action, call the\n```preventOutdatedRecordUpdate()``` method.\n\n```php\nEditAction::make()\n    -\u003elabel('Edit record')\n    -\u003epreventOutdatedRecordUpdate()\n```\n\nThe package uses the ```beforeFormValidated()``` action hook. If you are also\nusing this hook, you must call it **before** the\n```preventOutdatedRecordUpdate()``` method.\n\n```php\nEditAction::make()\n    -\u003elabel('Edit record')\n    -\u003ebeforeFormValidated(function () {\n        // ...\n    })\n    -\u003epreventOutdatedRecordUpdate()\n```\n\n### Edit record (page)\n\nTo prevent outdated record updates on the edit record (page), use the\n```PreventsOutdatedRecordUpdate``` trait.\n\n```php\n\u003c?php\n\nnamespace App\\Filament\\Resources\\Posts\\Pages;\n\nuse BalisMatz\\FilamentPreventOutdatedRecordUpdate\\Concerns\\PreventsOutdatedRecordUpdate;\nuse Filament\\Resources\\Pages\\EditRecord;\n\nclass EditPost extends EditRecord\n{\n    use PreventsOutdatedRecordUpdate;\n\n    // ...\n}\n```\n\nThe package uses the ```beforeSave()``` hook. If you are also using this hook,\nyou can use the ```PreventsOutdatedRecordUpdate``` trait, as shown in the\nfollowing example:\n\n```php\n\u003c?php\n\nnamespace App\\Filament\\Resources\\Posts\\Pages;\n\nuse BalisMatz\\FilamentPreventOutdatedRecordUpdate\\Concerns\\PreventsOutdatedRecordUpdate;\nuse Filament\\Resources\\Pages\\EditRecord;\n\nclass EditPost extends EditRecord\n{\n    use PreventsOutdatedRecordUpdate {\n        beforeSave as preventsOutdatedRecordUpdateBeforeSave;\n    }\n\n    // ...\n\n    protected function beforeSave(): void\n    {\n        // ...\n\n        $this-\u003epreventsOutdatedRecordUpdateBeforeSave();\n\n        // ...\n    }\n\n    // ...\n}\n```\n\n## License\n\nFilament Prevent Outdated Record Update is open-sourced software licensed under\nthe [MIT license](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalismatz%2Ffilament-prevent-outdated-record-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalismatz%2Ffilament-prevent-outdated-record-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalismatz%2Ffilament-prevent-outdated-record-update/lists"}