From 4c54c21aff0df5e24c0245adc126b0b92895fd97 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 1 Dec 2021 15:37:40 -0600 Subject: [PATCH] Update README.md --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b00a926..d4d6c95 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,30 @@ This repository is an implementing of the [Laravel Breeze](https://laravel.com/d #### Installation -To get started, clone this repository and install its dependencies with `yarn install` or `npm install`. Then, copy the `.env.example` file to `.env.local` and supply the URL of your backend: +First, create a Next.js compatible Laravel backend by installing Laravel Breeze into a [fresh Laravel application](https://laravel.com/docs/installation) and installing Breeze's API scaffolding: + +```bash +# Create the Laravel application... +laravel new next-backend + +cd next-backend + +# Install Breeze and dependencies... +composer require laravel/breeze + +php artisan breeze:install api + +# Serve the application... +php artisan serve +``` + +Next, clone this repository and install its dependencies with `yarn install` or `npm install`. Then, copy the `.env.example` file to `.env.local` and supply the URL of your backend: ``` NEXT_PUBLIC_BACKEND_URL=http://localhost:8000 ``` -Next, run the application via `npm run dev`. The application will be available at `http://localhost:3000`: +Finally, run the application via `npm run dev`. The application will be available at `http://localhost:3000`: ``` npm run dev