{"id":17024678,"url":"https://github.com/reziamini/laravel-tracker","last_synced_at":"2025-04-12T11:20:54.111Z","repository":{"id":39710175,"uuid":"326484701","full_name":"reziamini/laravel-tracker","owner":"reziamini","description":"A package to track your model data and monitor model data","archived":false,"fork":false,"pushed_at":"2022-10-28T19:49:15.000Z","size":12,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T06:05:16.564Z","etag":null,"topics":["laravel","laravel-package","laravel-tracker","monitoring","track","tracker"],"latest_commit_sha":null,"homepage":"","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/reziamini.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}},"created_at":"2021-01-03T19:27:25.000Z","updated_at":"2024-10-21T13:30:42.000Z","dependencies_parsed_at":"2022-09-20T08:33:50.971Z","dependency_job_id":null,"html_url":"https://github.com/reziamini/laravel-tracker","commit_stats":null,"previous_names":["reziamini/laravel-tracker","rezaamini-ir/laravel-tracker"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reziamini","download_url":"https://codeload.github.com/reziamini/laravel-tracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248558125,"owners_count":21124223,"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":["laravel","laravel-package","laravel-tracker","monitoring","track","tracker"],"created_at":"2024-10-14T07:26:35.028Z","updated_at":"2025-04-12T11:20:54.085Z","avatar_url":"https://github.com/reziamini.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Tracker\nA package to track your model data and monitor model data\n\n## Installation\nFirst you should install package with composer :\n```bash\ncomposer require rezaamini-ir/laravel-tracker\n```\n\nNext publish dependencies :\n```bash\nphp artisan tracker:install\n```\n\nNow you can run migration to create tracker tables:\n```bash\nphp artisan migrate\n```\n\nThere we go, We have installed package, Let's use it.\n\n## Usage\nTo use from package you must use from tracker trait in model which you want to track \n```php\nuse Tracker\\Traits\\Trackable;\n\nclass Article extends Model{\n    use Trackable;\n}\n```\nNow you can use `track()` method to track in your Article Single page controller \n\n```php\nclass ArticleContoller extends Controller\n{\n    public function show(Article $article){\n        $article-\u003etrack();\n        //..\n    }\n}\n```\n\nIt will be tracked after every seen by users.\nYou can set `track_mode` in config in choose what kind of tracker should be used in your project.\n\nIn your stats page you can use `tracks()` and `trackCount()` method to get tracked data.\nFor example :\n\n```php\nclass StatsContoller extends Controller\n{\n    public function getStats(Article $article){\n        $article-\u003etrackCount(); // An integer of tracked count\n        $article-\u003etracks; // A collection of tracked data \n        $article-\u003etrackBetween(now()-\u003esubDays(7), now()); // Tracked data between range of date since last week \n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freziamini%2Flaravel-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freziamini%2Flaravel-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freziamini%2Flaravel-tracker/lists"}