Table of Contents
For every web application – login & registration must be a needed part. Inside this article we will see Laravel 8 Authentication with Breeze. We will do Laravel authentication with breeze.
Laravel founder Taylor otwell released laravel breeze with simple authentication scaffolding. Inside this we will see composer package for breeze. Laravel Breeze is powerful combination by Blade templates and Tailwind. It publishes controllers for authentication system, views and routes to laravel application.
Let’s get started.
Installation of Laravel Application
Laravel Installation can be done in two ways.
- Laravel Installer
- By using composer
To install Laravel via Laravel installer, we need to install it’s installer first. We need to make use of composer for that.
composer global require laravel/installer
This command will install laravel installer at system. This installation is at global scope, so you type command from any directory at terminal. To verify type the given command –
This command will open a command palette of Laravel Installer.
To create ad install laravel project in system,
laravel new blog
With the name of blog a laravel project will be created at your specified path.
By using composer
Alternatively, we can also install Laravel by Composer command create-project. If your system doesn’t has Composer Installed, Learn Composer Installation Steps. Here is the complete command to create a laravel project-
composer create-project --prefer-dist laravel/laravel blog
After following these steps we can install a Laravel application into system.
To start the development server of Laravel –
php artisan serve
This command outputs –
Starting Laravel development server: http://127.0.0.1:8000
Assuming laravel already installed at system.
Database also configured with application.
We need to Install laravel breeze package for the authentication. Open Laravel project to terminal and type the given command.
$ composer require laravel/breeze --dev
While Installation, this will be the screen we get
It will install breeze to application. Now, to install laravel breeze for simple auth scaffolding.
$ php artisan breeze:install
After this command need to run the command
$ npm install && npm run dev
It will generate CSS and JS compiled files for authentication system. After running this, all controllers, routes, views we can find into source code of laravel application.
Next, we need to run migration command to generate tables in database. Open terminal and run this artisan command.
$ php artisan migrate
Breeze Authentication Controllers
Authentication controller we can find into the path /app/Http/Controllers/Auth
Breeze Authentication Routes
Application routes configuration we can find into the directory /routes. File name is auth.php.
This auth.php file is included in web.php i.e main configuration file for routes. Have a look.
web.php -> require DIR.’/auth.php’;
Breeze Authentication Views
Blade template files after generating breeze scaffolding we can find at path /resources/views/auth
Open project to terminal and type the command to start development server
$ php artisan serve
URL – 127.0.0.1:8000
When we click on register link, it will open
When we click on Login page, it will open the login page
After filling valid login details, we should see this user dashboard
We hope this article helped you to learn about Laravel 8 Authentication with Breeze in a very detailed way.
Find More on Laravel 8 Articles here
- How to Create Multi Language Website in Laravel 8
- How To Read XML File in Laravel 8 – Example
- How To Upload And Save XML Data in Laravel 8
- Laravel 8 Ajax Post Request Tutorial
- Laravel 8 Authentication using Jetstream with Inertia Js
- Laravel 8 Authentication using Jetstream with Livewire
- Laravel 8 Authentication with Breeze Tutorial
- Laravel 8 Clear Cache of Route, View & Config
- Laravel 8 Cron Job Task Scheduling Tutorial
- Laravel 8 DataTable Ajax Pagination with Search And Sort
- Laravel 8 Firebase Push Notification Tutorial
- Laravel 8 Form Validation Methods
- Laravel 8 Installation Guide – PHP Framework
- Laravel 8 Layouts And Views Complete Guide
- Laravel 8 Routing Tutorial Step by Step Guide
- Laravel 8 Send Mail using Gmail SMTP Server
- Laravel 8 Send Push Notification to Android Using Firebase
- Laravel 8 Send Push Notification to IOS Using Firebase
- Laravel 8 Stub Customization
Hi, I am Sanjay the founder of Online Web Tutor. I welcome you all guys here to join us. Here you can find the web development blog articles. You can add more skills in web development courses here.
I am a Web Developer, Motivator, Author & Blogger. I also used to take online classes including tech seminars over web development courses. We also handle our premium clients and delivered up to 50+ projects.