Overview:
Laravel Breeze Nuxt3 is an implementation of Laravel Breeze, a Laravel application/authentication starter kit frontend, in Nuxt3. It provides a pre-built authentication boilerplate powered by Laravel Sanctum, allowing developers to quickly pair their Nuxt3 frontend with a robust Laravel backend.
Features:
- Authentication Boilerplate: Laravel Breeze Nuxt3 comes with a pre-built authentication boilerplate, saving developers time and effort in setting up authentication functionality.
- Laravel Sanctum Integration: The authentication functionality is powered by Laravel Sanctum, providing a secure and reliable authentication system.
- Custom useAuth Vue Composable: This Nuxt.js application includes a custom useAuth Vue composable, which abstracts away authentication logic and allows developers to easily access the currently authenticated user.
- Named Routes with Ziggy: Laravel Breeze Nuxt3 conveniently allows developers to reference Laravel application’s named route URLs from the Nuxt3 application using Ziggy, making it easier to work with routing.
Installation:
To install Laravel Breeze Nuxt3, follow these steps:
Backend Installation:
- Set the
APP_URLandFRONTEND_URLenvironment variables in your.envfile. - Serve the Laravel application using the
serveArtisan command in the command line.
Frontend Installation:
- Clone the Laravel Breeze Nuxt3 repository.
- Install the necessary dependencies using either
yarn installornpm install. - Copy the
.env.examplefile to.envand provide the URL of your backend. - Run the application using
yarn devornpm run dev. The application will be available athttp://localhost:3000.
Production Build:
To build the application for production, follow these steps:
- Run
yarn buildornpm run buildto build the application. - Preview the production build locally using
yarn previewornpm run preview.
Summary:
Laravel Breeze Nuxt3 is an implementation of Laravel Breeze in Nuxt3, providing a pre-built authentication frontend for developers to pair with their Laravel backend. With ready-to-use authentication boilerplate, Laravel Sanctum integration, and convenient features like the useAuth Vue composable and named routes with Ziggy, Laravel Breeze Nuxt3 offers a robust and efficient solution for creating secure and reliable applications.