This is the official repository for the Laravel Microservice course by Gary Clarke.
The application is built using the Laravel framework and is designed to demonstrate real-world microservice architecture, including how to receive, process, and forward webhook events to other services.
Learn Laravel by building a real-world microservice from scratch:
- Handle webhook events from external platforms (e.g. Apple & Google)
- Validate and process incoming data
- Forward structured payloads to a second Laravel app (AudienceGrid)
- Use Laravel’s powerful features like tagged services, DTOs, and HTTP testing
🎓 Check out the full course here use coupon GCTREPO20 for a 20% course discount.
- Laravel microservice architecture
- Webhook handling
- DTOs, service providers, and configuration management
- Service-to-service communication via Laravel's HTTP client
- Testing strategies with Pest
- Environment-specific error handling
Each Git branch corresponds to a lesson or milestone in the course. Simply check out the relevant branch to follow along with any section.
Example:
git checkout 2-phpstan
git checkout 3-composer-scripts
Clone the repo and install dependencies:
git clone https://github.com/GaryClarke/laravel-microservice.git
cd laravel-microservice
composer install
SQLite is preconfigured. You can create a blank database file like this:
touch database/database.sqlite
Then run migrations:
php artisan migrate
This microservice forwards data to another Laravel application called AudienceGrid, which simulates a CRM-like system.
You can run both apps simultaneously:
php artisan serve --port=8000 # Laravel Microservice
php artisan serve --port=8005 # AudienceGrid
The app includes Pest and PHPStan for testing and static analysis:
composer test
If you're comfortable with Composer and Laravel, you’re welcome to install dependencies one-by-one as seen in the videos. Otherwise, use the included composer.json
for consistency with the course setup.
Have a question? Ask inside the course.
This repo is provided for educational use only as part of the Laravel Microservice course.
Happy coding!
– Gary