Laravel 10 Auth Scaffolding using Jetstream Tutorial

[ad_1]

Laravel 10 auth scaffolding example; In this tutorial, you will learn from scratch on how to build a login, register, logout, forget password, profile and reset password page by using scaffolding Jetstream without using Laravel 10 make:auth command.

First of all, this Laravel 10 Auth Scaffolding tutorial will let you know about new jetstream auth package. In the Laravel 10 adds new jetstream composer command with livewire, Inertia package for login, register, logout, reset password, forget password, email verification, two-factor authentication, session management.

This Laravel 10 auth example tutorial will use the jetstream and livewire package to implement default login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file.

Laravel 10 Auth Scaffolding using Jetstream with Livewire will look like in following images:

Home/Welcome Page

Login Page

Register Page

Dashboard Page

Reset Password page

Laravel 10 Auth Example Tutorial

  • Step 1 – Install Laravel 10 App
  • Step 2 – Database Configuration
  • Step 3 – Install Auth Scaffolding Jetstream
  • Step 4 – Install Livewire Package
  • Step 5 – Jetstream Configuration
  • Step 6 – Run PHP artisan Migrate
  • Step 7 – Install Npm Packages
  • Step 8 – Run Development Server

Step 1 – Install Laravel 10 App

First of all, start your terminal to download or install Laravel 10 new setup. Run the following commands in it to install the new Laravel 10 app on your system:

//for windows user
cd xampp/htdocs

//for ubuntu user
cd var/www/html

Then install Laravel 10 latest application using the following command:

composer create-project --prefer-dist laravel/laravel Laravel8Auth

Step 2 – Database Configuration

In this step, Configure your database with your apps. So, visit your app root directory and find .env file. Then configure database details as follows:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db name
DB_USERNAME=db user name
DB_PASSWORD=db password

Step 3 – Install Auth Scaffolding Jetstream

In step 3, install auth scaffolding jetstream package in laravel app by using the following command:

composer require laravel/jetstream

Step 4 – Install Livewire Package

Then, use the following command to create basic login, register, logout and email verification views file:

php artisan jetstream:install livewire

OR

php artisan jetstream:install livewire --teams

Note that, if you want to create team management then you have to pass addition parameter with command.

Step 5 – Jetstream Configuration

In step 5, open fortify.php file and you can enable and disable option of jetstream package according to your requirement, which is located inside config directory.

When you open it, it looks like:

'features' => [
        Features::registration(),
        Features::resetPasswords(),
        //Features::emailVerification(),
        Features::updateProfileInformation(),
        Features::updatePasswords(),
        Features::twoFactorAuthentication(),
    ],

Step 6 – Run php artisan Migrate

In step 6, open terminal and type the following command on it to create database table:

php artisan migrate

Step 7 – Install Npm Packages

In step 7, open again command prompt and type the following command to install node js:

npm install

Then type the following command on cmd to run npm:

npm run dev

Step 8 – Run Development Server

In step 8, use the following command to start development server:

php artisan serve

Now, open browser and hit the following url on it:

http://127.0.0.1:8000/

Recommended Laravel Posts

[ad_2]

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

GSTIN is 03EGRPS4248R1ZD.

Contact
Jassweb, Rai Chak, Punjab, India. 143518
Item added to cart.
0 items - 0.00