This project implements a real-time comments system using Laravel and Livewire. It allows users to post comments, reply to existing comments, and see updates in real-time without page reloads.
- Real-time comments posting and updating
- Nested replies
- User authentication
- Pagination
- PHP 8.2+
- Laravel 11.x
- Livewire 3.x
- MySQL 5.7+
-
Clone the repository:
git clone https://github.com/yourusername/comments-system-with-laravel-livewire.git
-
Navigate to the project directory:
cd comments-system-with-laravel-livewire
-
Install dependencies:
composer install npm install
-
Copy the
.env.example
file to.env
and configure your database settings. -
Run migrations:
php artisan migrate
-
Compile assets:
npm run dev
-
Start the development server:
php artisan serve
- Register a new user account or log in with existing credentials.
- Navigate to a post or page with comments enabled.
- Use the comment form to post new comments or reply to existing ones.
- Comments will update in real-time for all users viewing the page.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open-sourced software licensed under the MIT license.