0% found this document useful (0 votes)
53 views3 pages

8 Laravel Breeze Lab

Uploaded by

ttooffee23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views3 pages

8 Laravel Breeze Lab

Uploaded by

ttooffee23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

// php artisan –version

Frontend Components

Laravel Breeze
Laravel Breeze is a simple starter kit that provides everything you need for an average
Laravel application to allow your users to sign up, log in, and manage their profiles.

Installing Breeze

Breeze is intended to be installed on new apps, so it’s usually the first thing you’ll
install when you spin up a new app:

laravel new myProject

cd myProject

composer require laravel/breeze --dev

Once Breeze is added to your project, you’ll run its installer:

php artisan breeze:install

php artisan breeze:install --livewire

php artisan breeze:install --react

php artisan breeze:install --vue

Once you run the installer, you’ll be prompted to choose a stack: Blade, Inertia with
React, Inertia with Vue, or API, which is meant to power a non-Inertia frontend like Next.js.
These stacks are explained in the following section.

After Breeze is installed, make sure to run your migrations and build your frontend:

php artisan migrate

npm install

npm run dev


What comes with Breeze

Breeze automatically registers routes for registration, login, logout, password reset, email
verification, and password confirmation pages. These routes live in a new routes/auth.php
file.

The non-API form of Breeze also registers routes for a dashboard and an “edit
profile― page for users, and adds these routes directly to the routes/web.php file.

The non-API form of Breeze also publishes controllers for the “edit profile― page,
email verification, password resets, and several other authentication-related features. In
addition, it adds Tailwind, Alpine.js, and PostCSS (for Tailwind). Beyond these shared files
and dependencies, each stack adds its own, unique to its needs:
Breeze Blade
Breeze Blade comes with a series of Blade templates for all the features mentioned
above, which you can find in resources/views/auth, resources/view/components,
resources/views/profile, and a few others sprinkled around.

Breeze Inertia
Both Inertia stacks bring in Inertia, Ziggy (a tool for generating URLs to Laravel
routes in JavaScript), Tailwind’s “forms― component, and the necessary
JavaScript packages to make their respective frontend frameworks function. They
both also publish a basic Blade template that loads Inertia and a series of React/Vue
components for all the published pages in the resources/js directory.

Breeze API
The API stack for Breeze installs significantly less code and fewer packages than the
other stacks, but it also removes the existing bootstrapped files that come with all new
Laravel apps. The API stack is intended to prepare an app to be only an API backend
for a separate Next.js app, so it removes package.json, all the JavaScript and CSS
files, and all the frontend templates.

Laravel Jetstream
Jetstream builds on Breeze’s functionality and adds even more tooling for starting a new
app; however, it’s a more complicated setup with fewer options for configuration, so
you’ll want to know that you need it before you choose Jetstream over Breeze.

Jetstream, like Breeze, publishes routes, controllers, views, and configuration files. Like
Breeze, Jetstream uses Tailwind, and comes in different tech “stacks.―

Unlike Breeze, however, Jetstream requires interactivity, so there’s no Blade-only stack.


Instead, you have two choices: Livewire (which is Blade with some PHP-powered JavaScript
interactivity) or Inertia/Vue (there’s no React form for Jetstream).
Jetstream also expands Breeze’s offering by bringing in team management features, two-
factor authentication, session management, and personal API token management.

You might also like