Laravel 8 introduced a beautifully designed application starter kit known as Laravel Jetstream that provides an ideal starting point for your next Laravel application. It is a new application scaffolding for Laravel. Laravel Jetstream replaces the legacy of Laravel authentication UI applicable for earlier Laravel versions.
Laravel Jetstream provides the implementation for your application's login, email verification, registration, two-factor authentication, session management, API through Laravel Sanctum, and optional team management points. It is a free and open-source framework that utilizes Tailwind CSS, and you can decide between Laravel Livewire or Inertia.
You need to run the following command to install the Jetstream via composer in your laravel project.
composer require laravel/jetstream
After installing the Jetstream in your project, you can perform the jetstream:install Artisan command. This command acquires the name of the stack you prefer (livewire or inertia).
If you prefer Livewire with the Blade then you've to run:
php artisan jetstream:install livewire
And if you want to utilize Jetstream with the Inertia then you've to run:
php artisan jetstream:install inertia
You may also append the --teams flag to enable Laravel Jetstream team support.
After Jetstream installation, you have to run these commands to build your NPM dependencies and migrate your database:
npm install npm run dev php artisan migrate
Your latest Jetstream application provides unconventional features:
You can find those views at:
Behind the curtain, the authentication parts of Jetstream are powered by Laravel Fortify. It registers the routes and controllers that are required to execute all of Laravel's authentication peculiarities, including login, registration, password reset, email verification, and more. After Fortify installation, you can run the route:list Artisan command to view the routes that Fortify has registered.
You can locate the Laravel Fortify actions in the following directory:
And you can spot the Fortify configuration at:
In the fortify.php config file, you can perform some adjustments like enable and disable different features like:
'features' => [ Features::registration(), Features::resetPasswords(), // Features::emailVerification(), Features::updateProfileInformation(), Features::updatePasswords(), Features::twoFactorAuthentication(), ],
The official documentation for Laravel Jetstream can be found on the Jetstream website. Laravel Jetstream Introduction
Published at : 07-07-2021
I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.