Laravel 11 Jetstream Auth Scaffolding Tutorial

Laravel 11 Jetstream Auth Scaffolding Tutorial

In Laravel 11, Jetstream is a scaffolding library that provides authentication and authorization management features, which allows users to login, register, forget password, reset password, email verification, edit profile.

Here are steps to install and setup jetstream auth scaffolding:

Step 1 – Download Laravel 11

Run the following composer command to download and setup laravel 11:

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

Step 2 – Initialize Database with Project

Edit .env file from root folder of laravel project and configure database details, something like this:

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 Jetstream Auth

Run the following composer command to install jetStream auth:

composer require laravel/jetstream

Step 4 – Create Auth System using JetStream and livewire

Run the following jetstream and livewire command to create complete auth system in project:

php artisan jetstream:install livewire

OR

php artisan jetstream:install livewire --teams

Step 5 – Jetstream Configuration

Edit fortify.php file from config folder to configure jetstream in it, ,something like this:

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

Step 6 – Run Migration Command

Run migration command to create tables in database:

php artisan migrate

Step 7 – Install NPM packages

Run the following npm command to install the npm package in the project:

npm install
npm run dev

Step 8 – Test Application

Run the php artisan serve command to start the application server:

php artisan serve

Hit http://127.0.0.1:8000/ URL on browser for testing a complete jetstream auth system.

In this tutorial guide, you learned how to implement login, registration, forgotten password and email verification features in Laravel 11 using Jetstream Auth.

Recommended Guides

AuthorAdmin

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *