Laravel Jetstream an introduction

Laravel Jetstream an introduction

We cover in this article a fresh Laravel 8 and Jetstream 2 with Livewire 2, TailwindCSS 2, teams setup.

Laravel is a popular PHP Framework to make building web applications, It makes the process so enjoyable, with elegant syntax, and a bunch of packages, supported by the creator it self Taylor Otwell, as you may know, its much productive when you focus on actually writing business logic rathern then boostrap and setting up things.

So among so many choices, Breeze, Sanctrum, Fortify, today's topic is about Jetstream, and one of its advanced features, Teams.

Laravel Jetstream is a beautifully designed application starter kit for Laravel and provides the perfect starting point for your next Laravel application. Jetstream provides the implementation for your application's login, registration, email verification, two-factor authentication, session management, API via Laravel Sanctum, and optional team management features. Jetstream is designed using Tailwind CSS and offers your choice of Livewire or Inertia scaffolding.

to start building with Jetstream package, this article will only cover how easy it is to install Laravel Jetstream Livewire teams.

Installing Laravel, Jetstream, Livewire, Teams.

Laravel

We first need to pull in a fresh Laravel installing. depending on your enviroment, I am using the global Laravel installer.

laravel new teaming
cd teaming
npm install && npm run dev

This command will create a new folder called "teaming", that we can access on the browser using teaming.test

Jetstream

composer require laravel/jetstream

We pull in jetstream package.

Livewire and Teams

php artisan jetstream:install livewire --teams

We install the front end stack, Livewire in our case, we can use Inertia instead.

We can instead use

laravel new teaming --jet --stack=livewire --teams

Finalizing the installation.

we need to setup a database, so the easiest way is to create a sqlite database and set it in the .env file

touch database/database.sqlite
DB_CONNECTION=sqlite  //we set sqlite on the .env file
npm install && npm run dev
php artisan migrate
php artisan vendor:publish --tag=jetstream-views

Lets visit our application.

laravel-jetstream-livewire-teams.png