Laravel 10 Auth with Inertia JS Jetstream Example

Laravel 10 jetstream was designed by Tailwind CSS and they provide auth scaffolding using livewire and Inertia. Laravel jetstream provides login, registration, email verification, two-factor authentication, session management, API via Laravel Sanctum, and team management features inbuilt.

Step 1: Install Laravel App

composer create-project laravel/laravel example-app

Install Jetstream:

composer require laravel/jetstream

Create Auth with Inertia:

now, we need to create authentication using bellow command. you can create basic login, register and email verification. if you want to create team management then you have to pass addition parameter. you can see bellow commands: 

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

Now, let's node js package:

npm install

let's run package:

npm run dev

 run migration

php artisan migrate

Laravel 10 Jetstream Features

Laravel 10 Jetstream provides new all feature are configurable. you can see there is a configuration file fortify.php and jetstream.php file where you can enable and disable option for that feature:

config/fortify.php

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

config/jetstream.php

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

Run Laravel App:

php artisan serve

Now, Go to web browser, type the given URL and see the output:

http://localhost:8000

Now you can see output with login and register button in home page. Thank You