Overview
The Laravel Breeze - React.js Edition is a frontend implementation of the Laravel Breeze application/authentication starter kit in React.js. It provides all the authentication boilerplate powered by Laravel Sanctum, allowing developers to quickly pair their React.js frontend with a robust Laravel backend.
Features
- Laravel Breeze integration: Easily integrate the Laravel Breeze authentication starter kit into your React.js application.
- Laravel Sanctum integration: Leverage the power of Laravel Sanctum for secure authentication in your React.js frontend.
- Easy installation: Simple installation process to get your React.js frontend up and running with a Laravel backend.
Installation
To install the Laravel Breeze - React.js Edition, follow these steps:
- Install Laravel Breeze into a fresh Laravel application by running the following command:
composer require laravel/breeze --dev
- Install Breeze’s API scaffolding by running the following command:
php artisan breeze:install-api
Set the
APP_URLandFRONTEND_URLenvironment variables in your application’s.envfile. SetAPP_URLtohttp://localhost:8000andFRONTEND_URLtohttp://localhost:3000.Serve the Laravel application using the Artisan command:
php artisan serve
Clone the Laravel Breeze - React.js Edition repository and install its dependencies using either
yarn installornpm install.Copy the
.env.examplefile to.envand provide the URL of your backend.Run the application using the command:
npm run dev
- Access the application at
http://localhost:3000.
Note: It is recommended to use localhost during local development to avoid CORS “Same-Origin” issues.
Summary
The Laravel Breeze - React.js Edition is a convenient way to integrate the Laravel Breeze authentication starter kit into a React.js frontend. It offers easy installation and supports secure authentication through Laravel Sanctum. By following the provided installation guide, developers can quickly set up their React.js frontend with a Laravel backend and start building their application. The project is open-source and released under the MIT license.