This repository contains examples of using Laravel 11 with Livewire. It provides several use cases demonstrating how to integrate Livewire components into a Laravel application.
Livewire Counter Example Screenshot
Livewire Load More Example Screenshot
Livewire Live Search Screenshot
- Increasing and decreasing with a counter (You can think of it as a cart system)
- A pagination system where you load blog posts with the load more button.
- Instant search system
Before you begin, ensure you have met the following requirements:
- PHP >= 8.2
- Composer installed globally
- Node.js and npm installed
To install and set up the project locally, follow these steps:
- Clone the repository:
git clone https://github.com/mrcandev/Laravel-and-Livewire-Examples.git
- Navigate to the project directory:
cd project_folder
- Install PHP dependencies:
composer install
- Install JavaScript dependencies:
npm install
- Compile assets:
npm run dev
- Set up your environment variables:
cp .env.example .env php artisan key:generate
- Run migrations (optional):
php artisan migrate
To install and set up the project locally, follow these steps:
- To run the application, use the following command:
php artisan serve
Visit http://localhost:8000 in your web browser to view the application.
Contributions are welcome! Here's how you can contribute to this project:
- Fork the repository.
- Create a new branch (git checkout -b feature/your-feature-name).
- Commit your changes (git commit -am 'Add some feature').
- Push to the branch (git push origin feature/your-feature-name).
- Create a new Pull Request.
If you find this project useful and would like to support its development, you can:
- Star the repository: If you find this project helpful or interesting, please give it a star.
- Fork and contribute: Contributions are welcome! Feel free to fork this project and submit pull requests.
- Donate: If you'd like to make a monetary donation to support the developer, you can use the sponsor button on GitHub or visit the developer's profile for more options.
This project is licensed under the MIT license. .