/turbo-demo-app

This is a demo application that uses Turbo Laravel.

Primary LanguagePHP

Turbo Laravel Demo App

This application serves as an example of applying Hotwire in Laravel.

Demo App

It uses:

This app is live. You can test it out at turbo-laravel.tonysm.com.

Setup

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 install

Copy the .env.example file:

cp .env.example .env

Then 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:generate

Boot the Services Up:

sail up -d

Migrate the Database:

sail artisan migrate

Link the Storage Folder (for Importmap):

sail artisan storage:link

Download Tailwind CSS and Compile:

sail artisan tailwindcss:download
sail artisan tailwindcss:build

Running a Worker:

You will need a queue worker to process Turbo Stream broadcasts in background:

sail artisan queue:work --tries=1

Legal Notices

For the Reactions feature, we're using Twemoji and giving attribution here. This is the emoji dataset I'm using in combination with that service.