Laravel ElectricSQL Example

Capture-2024-11-22-151032

This project is an example of how to use ElectricSQL with Laravel. It is a simple todo list application that allows you to add, edit, and delete todos with a React frontend connected to a Laravel backend with InertiaJS.

This project uses DDEV for local development environment setup.

Prerequisites

DDEV Installation

DDEV is required to run this project. To install DDEV:

  1. First, install Docker for your operating system (on macOS, I recommend using OrbStack).
  2. Install DDEV by following the instructions for your OS:

Project Setup

  1. Clone this repository:
git clone https://github.com/braedencrankd/electric-laravel-example.git
  1. Run ddev start to start the development environment.

  2. Run ddev composer install to install the dependencies.

  3. Run ddev npm install to install the dependencies.

  4. Run cp .env.example .env to copy the environment variables.

  5. Run ddev artisan key:generate to generate the application key.

  6. Run ddev artisan migrate:fresh --seed to run the migrations.