{"id":21541810,"url":"https://github.com/ramadani/catagger","last_synced_at":"2025-10-12T09:09:23.613Z","repository":{"id":62534295,"uuid":"71674841","full_name":"ramadani/catagger","owner":"ramadani","description":"Create types for Item on your Laravel App","archived":false,"fork":false,"pushed_at":"2016-11-03T23:02:27.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-28T20:22:52.030Z","etag":null,"topics":["categorization","laravel","laravel-package","taggable"],"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/ramadani.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}},"created_at":"2016-10-23T01:21:36.000Z","updated_at":"2018-11-11T23:40:45.000Z","dependencies_parsed_at":"2022-11-02T15:15:34.223Z","dependency_job_id":null,"html_url":"https://github.com/ramadani/catagger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ramadani/catagger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fcatagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fcatagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fcatagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fcatagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramadani","download_url":"https://codeload.github.com/ramadani/catagger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramadani%2Fcatagger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010958,"owners_count":26084836,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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":["categorization","laravel","laravel-package","taggable"],"created_at":"2024-11-24T05:07:43.750Z","updated_at":"2025-10-12T09:09:23.566Z","avatar_url":"https://github.com/ramadani.png","language":"PHP","readme":"# Catagger\n\nSimple way to creating types for item on your Laravel App, such as category and tag for article or product, genre for movie, skill for user, etc.\n\n## Installation\n\nIn order to install Catagger, just enter on your terminal\n\n```bash\n$ composer require redustudio/catagger\n```\n\nIn `config/app.php` file, add\n\n```php\nRedustudio\\Catagger\\ServiceProvider::class,\n```\n\nin the `providers` array and\n\n```php\n'Catagger' =\u003e Redustudio\\Catagger\\Facade::class,\n```\n\nto the `aliases` array.\n\nIf you are not using Laravel 5.3, run this command for publishing migration.\n\n```bash\n$ php artisan vendor:publish --provider=\"Redustudio\\Catagger\\ServiceProvider\" --tag=\"migrations\"\n```\n\nthen\n\n```bash\n$ php artisan migrate\n```\n\nfor migration catagger tables.\n\n## Usage\n\n#### Attaching to Item\n\n```php\n// Post\nuse Redustudio\\Catagger\\CataggerTrait;\n\nclass Post extends Model\n{\n    use CataggerTrait;\n\n    public function categories()\n    {\n        return $this-\u003ecataggers('category');\n    }\n\n    public function tags()\n    {\n        return $this-\u003ecataggers('tag');\n    }\n}\n\n$category = 'Programming';\nCatagger::sync($post-\u003ecategories(), $category);\n\n$tags = ['PHP', 'Laravel', 'Package'];\nCatagger::sync($post-\u003etags(), $tags);\n\n```\n\n```php\n// Movie\nuse Redustudio\\Catagger\\CataggerTrait;\n\nclass Movie extends Model\n{\n    use CataggerTrait;\n\n    public function genres()\n    {\n        return $this-\u003ecataggers('genre');\n    }\n}\n\n$genres = ['Action', 'Adventure', 'Sci-Fi'];\nCatagger::sync($movie-\u003egenres(), $genres);\n```\n\n#### Detaching from Item\n\n```php\n$genres = ['Action', 'Adventure', 'Sci-Fi'];\nCatagger::sync($movie-\u003egenres(), $genres);\n\n$genres = ['Action', 'Sci-Fi'];\nCatagger::detach($movie-\u003egenres(), $genres); // detaching 'Action' and `Sci-Fi`\n\n// detaching all genres\nCatagger::detach($movie-\u003egenres());\n```\n\n## Todo\n\n- [ ] Unit Test\n\n## About ReduStudio\n\n[ReduStudio][homepage] is web development freelancers based in Yogyakarta and East Borneo, Indonesia. We specialise in developing websites and web apps with Laravel, the most popular PHP Framework.\n\n### Let's Start Project With Us\n\nJust Contact Us At:\n- Email: [redustudio@gmail.com][mailto]\n- Facebook: [ReduStudio's FB Page][fbpage]\n\n## License\nThe [MIT][mitlink] License (MIT). Please see [License File](LICENSE.md) for more information.\n\n\n[screenshot]: admin.png\n[homepage]: http://redustudio.com/\n[mailto]: mailto:redustudio@gmail.com\n[fbpage]: https://www.facebook.com/Redustudio/\n[mitlink]: http://opensource.org/licenses/MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framadani%2Fcatagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framadani%2Fcatagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framadani%2Fcatagger/lists"}