This application serves as an example of applying Hotwire in Laravel.
It uses:
- Turbo Laravel (via
tonysm/turbo-laravelpackage) - Laravel WebSockets (via
beyondcode/laravel-websocketspackage) - Many built-in components from Laravel
This app is live. You can test it out at turbo-laravel.tonysm.com.
The local environment relies on Laravel Sail. So, in order to continue, make sure you check out the docs from that.
Install Composer dependencies:
docker run --rm \
-v $(pwd):/opt \
-w /opt \
laravelsail/php80-composer:latest \
composer installCopy the .env.example file:
cp .env.example .envThen you can edit this new .env file as you want.
Of course you can also add your own file .env file.
Generate the APP_KEY:
docker run --rm \
-v $(pwd):/opt \
-w /opt \
laravelsail/php80-composer:latest \
php artisan key:generateBoot the Services Up:
sail up -dMigrate the Database:
sail artisan migrateLink the Storage Folder (for Importmap):
sail artisan storage:linkDownload Tailwind CSS and Compile:
sail artisan tailwindcss:download
sail artisan tailwindcss:buildRunning a Worker:
You will need a queue worker to process Turbo Stream broadcasts in background:
sail artisan queue:work --tries=1For the Reactions feature, we're using Twemoji and giving attribution here. This is the emoji dataset I'm using in combination with that service.
