{"id":20397209,"url":"https://github.com/litstack/timeline","last_synced_at":"2025-07-26T05:14:29.179Z","repository":{"id":239740214,"uuid":"341839048","full_name":"litstack/timeline","owner":"litstack","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-09T14:53:19.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T11:10:39.266Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/litstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-24T09:01:22.000Z","updated_at":"2024-05-14T09:08:21.000Z","dependencies_parsed_at":"2024-05-14T11:29:11.917Z","dependency_job_id":null,"html_url":"https://github.com/litstack/timeline","commit_stats":null,"previous_names":["litstack/timeline"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litstack%2Ftimeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litstack%2Ftimeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litstack%2Ftimeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litstack%2Ftimeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litstack","download_url":"https://codeload.github.com/litstack/timeline/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241945526,"owners_count":20046869,"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":[],"created_at":"2024-11-15T04:12:33.981Z","updated_at":"2025-03-05T01:13:11.154Z","avatar_url":"https://github.com/litstack.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Litstack Timeline\n\nA package to simply add timelines to Crud's in litsatck.\n\n## Setup\n\n1. Install the package via composer:\n\n```shell\ncomposer require litstack/timeline\n```\n\n2. Publish and run the migrations:\n\n```shell\nphp artisan vendor:publish --tag=timeline:migrations\nphp artisan migrate\n```\n\n## Usage\n\nAdd the `Timelineable` contract and the `HasTimeline` trait to your Model:\n\n```php\nuse Litstack\\Timeline\\Contracts\\Timelineable;\nuse Litstack\\Timeline\\HasTimeline;\n\nclass Post extends Model implements Timelineable\n{\n    use HasTimeline;\n}\n```\n\nPush a timeline item to your Model:\n\n```php\n// Add message to timeline.\n$post-\u003eaddToTimeline('Hello World!')-\u003esave();\n// With some available options.\n$post-\u003eaddToTimeline('Hello World!')-\u003etitle('Foo')-\u003eshowTime()-\u003evariant('success')-\u003esave();\n// Variant danger is available as well.\n$post-\u003eaddToTimeline('Hello World!')-\u003evariant('danger')-\u003esave();\n```\n\n## Show Timeline\n\nIn your `CrudConfig`:\n\n```php\npublic function show($page)\n{\n    $page-\u003etimeline();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitstack%2Ftimeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitstack%2Ftimeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitstack%2Ftimeline/lists"}