{"id":28767303,"url":"https://github.com/jkm96/comment-buddy","last_synced_at":"2026-05-09T06:35:40.666Z","repository":{"id":297619155,"uuid":"997254687","full_name":"jkm96/comment-buddy","owner":"jkm96","description":"A plug-and-play Laravel Livewire comment system for your blog posts.","archived":false,"fork":false,"pushed_at":"2025-06-06T13:46:38.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-17T13:03:56.865Z","etag":null,"topics":["blog","comment-buddy","comment-system","comments","laravel","livewire"],"latest_commit_sha":null,"homepage":"https://commentbuddy.mblog.co.ke","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/jkm96.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-06-06T08:04:58.000Z","updated_at":"2025-06-06T16:26:37.000Z","dependencies_parsed_at":"2025-06-06T13:32:35.154Z","dependency_job_id":null,"html_url":"https://github.com/jkm96/comment-buddy","commit_stats":null,"previous_names":["jkm96/comment-buddy"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jkm96/comment-buddy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkm96%2Fcomment-buddy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkm96%2Fcomment-buddy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkm96%2Fcomment-buddy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkm96%2Fcomment-buddy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkm96","download_url":"https://codeload.github.com/jkm96/comment-buddy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkm96%2Fcomment-buddy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["blog","comment-buddy","comment-system","comments","laravel","livewire"],"created_at":"2025-06-17T13:01:48.619Z","updated_at":"2026-05-09T06:35:40.658Z","avatar_url":"https://github.com/jkm96.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub release (latest by date)](https://img.shields.io/github/v/release/jkm96/comment-buddy?display_name=tag\u0026color=blue)\n![GitHub license](https://img.shields.io/github/license/jkm96/comment-buddy?color=green)\n# Comment Buddy\n\n**Comment Buddy** is a plug-and-play Laravel Livewire comment system for posts. It supports nested replies and optional success toasts for a seamless commenting experience.\n\n---\n\n## Installation\n\n1.In your Laravel project’s composer.json, add this:\n```php\n\"repositories\": [\n    {\n        \"type\": \"vcs\",\n        \"url\": \"https://github.com/jkm96/comment-buddy\"\n    }\n]\n\n```\n\n2.Then run:\n\n```bash\ncomposer require jkm96/comment-buddy\n```\n\n3.Publish the configuration file:\n\n```bash\nphp artisan vendor:publish --tag=comment-buddy-config\n```\n\nThis command creates the configuration file at `config/comment-buddy.php`.\n\n4.Publish the views:\n\n```bash\nphp artisan vendor:publish --tag=comment-buddy-views\n```\n\nThis command will copy all your views into the user’s project under:\n```php\nresources/views/vendor/comment-buddy/\n```\n\n5.Run the migrations to create the necessary database tables:\n\n```bash\nphp artisan migrate\n```\n\n---\n\n## Configuration\n\nEdit the configuration file `config/comment-buddy.php` to customize the package behavior:\n\n```php\nreturn [\n    'comment_model' =\u003e Comment::class,\n    'show_message' =\u003e true,\n];\n```\n\n- `comment_model` — The Eloquent model used to store comments.\n- `show_message` — Enable or disable toast messages on successful actions.\n\n---\n\n## Usage\n\nTo include the comment system in a Blade view (e.g., on a post detail page), add:\n\n```blade\n\u003clivewire:comment-section :post=\"$post\" /\u003e\n```\n\nMake sure your post model has an `id` and a relationship to comments.\n\n````php\n public function comments()\n {\n    return $this-\u003ehasMany(Comment::class)-\u003ewhereNull('parent_id');\n }\n````\n\nIf `show_message` is enabled, listen for toast messages with Livewire:\n\n```html\n\u003cscript\u003e\n    Livewire.on('toast-message', details =\u003e {\n        alert(details.message); // Replace this with your own toast notification logic\n    });\n\u003c/script\u003e\n```\n\n---\n\n## How It Works\n\n- `comment-section` — renders the entire comment thread along with the comment form.\n- `comment-form` — handles submitting new comments and replies.\n- `comment-thread` — renders nested replies recursively.\n- Uses Livewire for reactive, dynamic UI updates.\n- Comments are saved via the model defined in `comment_model` configuration.\n\n---\n\n## Service Provider\n\nComment Buddy auto-registers Livewire components and loads resources through its service provider:\n\n```php\nLivewire::component('comment-form', CommentForm::class);\nLivewire::component('comment-section', CommentSection::class);\nLivewire::component('comment-thread', CommentThread::class);\n```\n\nIt also loads views, migrations, and merges the configuration from:\n\n```\n__DIR__ . '/../config/comment-buddy.php'\n```\n\n---\n\n## Authentication\n\nUser authentication is required to post comments. If a user is not logged in, the comment form will not be displayed.\n\n**Note:** Guest commenting is not supported out of the box.\n\n---\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\nFeel free to customize and extend Comment Buddy to fit your project's needs!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkm96%2Fcomment-buddy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkm96%2Fcomment-buddy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkm96%2Fcomment-buddy/lists"}