We noticed you're using an ad blocker

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Laravel Jetstream tutorial

world cup 2022

FootballDesk

Get update standing EPL, UEFA, LaLiga and more

Get Now

From laravel 8.0, Tylor Otwell introduced an official package for application scaffolding called Jetstream. It's free and open-source. By this package, you can choose two stacks Laravel-Livewire or Laravel-Inertia. Jetstream views are designed with Tailwind CSS. Let's see what are the features of Jetstream offer and how we can install and use it for our laravel application development.

Note If you are thinking, why Jetstream? there is already Laravel UI package for auth scaffolding. The answer is, still you can use Laravel UI package or an updated version Laravel Breeze for auth scaffolding but the Jetstream is another option with a lot of features included. Jetstream released with Laravel 8 and it's not mandatory to use jetstream with Laravel 8. If you need the features described below then it's highly recommended.

Laravel Jetstream features

  • Open-source, free and maintained by laravel team.
  • Designed with balde+tailwind CSS.
  • Available stacks (Livewire + Blade and Inertia + Vue)
  • Auth scaffolding
  • Profile management
  • Two-factor authentication
  • API token with Laravel Sanctum
  • Team management
  • Multi-session management
  • and more

 

Note If you are using older composer then update it first by composer self-update command.

Installation

After installing laravel 8 application, run the composer command given below for install the Laravel Jetstream package.

composer require laravel/jetstream

 

Choose your stack

Jetstream offers two stacks (Livewire + Blade and Inertia + Vue). You can choose a stack for your application scaffolding.

for Livewire run the command.

php artisan jetstream:install livewire
php artisan jetstream:install livewire --teams

for Inertia run the command.

php artisan jetstream:install inertia
php artisan jetstream:install inertia --teams

 

Now install the NPM dependencies and migration to finish the installation process for Jetstream.

npm install && npm run dev
php artisan migrate

 

Jetstream Visual

After successful installation of Jetstream, you will get the login, registration, profile management view looks like below which are designed with Tailwind CSS.

jetstream-registration.png

[Jetstream Registration View]

jetstream-login.png

[Jetstream Login View] 

jetstream-profile.png

[Jetstream Profile Management View]

 

Jetstream Features Config

To enable or disable a jetstream features is very easy. All the auth related features are listed in config/fortify.php config file.

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

...

Jetstream features are listed in config/jetstream.php config file.

'features' => [
    Features::profilePhotos(),
    Features::api(),
    Features::teams(),
],
...

 

Jetstream package is really helpful to make the laravel application faster with popular stacks (Livewire and Inertia) in the Laravel community. Hope this post will help you to get an idea about what is Laravel Jetstream package is? is it important for you? and how you can install it in your laravel application. You can learn more about Laravel Jetstream by reading official Jetstream documentation. If you find this post helpful then please share with others.

 

Share on




Related Post - Latest Post


Tinkerpad - A minimal Laravel code editor

Laravel Query Log

Laravel User Activity

Laravel Breeze - Starting with Laravel has been easy!

Laravel API mailer

Laravel H package