{"id":18212015,"url":"https://github.com/bedus-creation/laraveltaggable","last_synced_at":"2025-04-02T18:31:58.691Z","repository":{"id":42025823,"uuid":"249166519","full_name":"bedus-creation/LaravelTaggable","owner":"bedus-creation","description":"Provide Categories and Tags to any laravel Models.","archived":false,"fork":false,"pushed_at":"2024-10-03T20:36:09.000Z","size":8767,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T11:50:27.980Z","etag":null,"topics":["categoiries","laravel-category","laravel-tags","tags"],"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/bedus-creation.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":"2020-03-22T11:12:07.000Z","updated_at":"2024-10-03T20:36:13.000Z","dependencies_parsed_at":"2022-08-12T02:40:54.232Z","dependency_job_id":null,"html_url":"https://github.com/bedus-creation/LaravelTaggable","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedus-creation%2FLaravelTaggable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedus-creation%2FLaravelTaggable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedus-creation%2FLaravelTaggable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedus-creation%2FLaravelTaggable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bedus-creation","download_url":"https://codeload.github.com/bedus-creation/LaravelTaggable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246870000,"owners_count":20847226,"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":["categoiries","laravel-category","laravel-tags","tags"],"created_at":"2024-11-03T15:04:24.075Z","updated_at":"2025-04-02T18:31:58.402Z","avatar_url":"https://github.com/bedus-creation.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Introduction \nCategory and Tags are often useful while working working with Laravel Model. This solution enable categories and tags for any Models in Laravel. Here step by step setup is given below.\n\n### Content\n1. [Installtion](https://github.com/bedus-creation/LaravelTaggable#step1-installation)\n2. [Publish Assets and Migration](https://github.com/bedus-creation/LaravelTaggable#step2-publish-migrations-assets)\n3. [Use Trait in model](https://github.com/bedus-creation/LaravelTaggable#step3-use-traits)\n4. [Call from anywhere](https://github.com/bedus-creation/LaravelTaggable#step4-call-from-anywhere)\n5. [Display in blade](https://github.com/bedus-creation/LaravelTaggable#step5-display-in-blade)\n### Step1: Installation\n```php\ncomposer require aammui/laravel-taggable\n```\n\n### Step2: Publish Migrations assets\n```\nphp artisan vendor:publish --provider=\"Aammui\\LaravelTaggable\\LaravelTaggableServiceProvider\"\nphp artisan migrate\n```\n\n### Step3: Use Traits\nAdd ```HasCatgory``` and ```HasTag``` Traits in your model.\n```php\n\u003c?php \n\nnamespace App;\n\nuse Aammui\\LaravelTaggable\\Traits\\HasCategory;\nuse Aammui\\LaravelTaggable\\Traits\\HasTag;\n\nclass Post extends Model {\n    use HasCategory, HasTag;\n}\n```\n\n### Step4: Call from anywhere.\n```php\n\u003c?php\n$post = Post::create(['name'=\u003e'Post']);\n$post-\u003eaddTag('Tags');\n$post-\u003eaddTag(['Tags','Category']);\n$post-\u003eaddCategory('Category');\n$post-\u003eaddCategory(['Category', 'Laravel Category']);\n```\n\n### Step5: Display In Blade\n```blade.php\n\u003cul\u003e\n@foreach($posts-\u003ecategory as $item)\n\u003cli\u003e{{$item-\u003ename}}\u003c/li\u003e\n@endforeach\n\u003c/ul\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedus-creation%2Flaraveltaggable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbedus-creation%2Flaraveltaggable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedus-creation%2Flaraveltaggable/lists"}