DEV Community

Cover image for Laravel Jetstream: First Look
Zubair Mohsin
Zubair Mohsin

Posted on

Laravel Jetstream: First Look

What is Laravel Jetstream?

It is a brand new Scaffolding package for your Laravel 8 projects. It goes beyond Authentication Scaffolding. And, its available as free, open source package by the Laravel team.

For too long we had Bootstrap and jQuery based scaffolding and this change was much needed to be honest.

What's changed from laravel/ui package?

  • Tailwind for the CSS.
  • Choose between Livewire or Inertia.js to handle your front-end exactly like we used to choose preset in laravel/ui.

How would we choose?

php artisan jetstream:install livewire
Enter fullscreen mode Exit fullscreen mode

or

php artisan jetstream:install inertia
Enter fullscreen mode Exit fullscreen mode

Inertia.js comes with Vue.js as default adapter.

Features 🚀

1- User Profile

Jetstream introduces User Profile feature where user can update their information which include:

  • Change their profile picture
  • Update their name/email/password
  • Two Factor Authentication (Recovery codes and QR code) 👌
  • User can view their other Browser Sessions and also log out from them
  • User can Delete their entire account
  • All of this functionality and its code is available to developer so that they have full control.

2- API Tokens

If your Laravel app exposes an API and you need to give User the ability to generate their own tokens, you can do so by adding a single line of code in your jetstream.php config file.

...
'features' => [
         Feature::api(),
],
...
Enter fullscreen mode Exit fullscreen mode

And a new page user/api-tokens will be added to application. User will also be able to manage token permissions on this page. These permissions are defined in JetstreamServiceProvider.

Laravel Jetstream uses Laravel Sanctum under-the-hood to generate API tokens.

3- Teams

Almost in every SAAS application now-a-days we need teams feature. Guess what? It comes out of the box with Laravel Jetstream 🥳

php artisan jetstream:install livewire --teams
Enter fullscreen mode Exit fullscreen mode

It will add teams entry in jetstream.php config file:

...
'features' => [
         Feature::teams(),
],
...
Enter fullscreen mode Exit fullscreen mode

Now you will be able to:

  • Manage Team
  • Create Team
  • Switch Team
  • Add Members to the Team ( even manage their Roles and Permissions 🔥 )

Amazing stuff, right?

When it will be available?

It will be available along with Laravel 8 which is coming out on 8th, September 2020. Or maybe a week/two weeks later.

Conclusion

Laravel team has basically offered the non-billing part of Laravel Spark as Laravel Jetstream.

I think it's gonna give you a sick starting point for building modern Laravel applications in 2020 - Taylor Otwell

Top comments (12)

Collapse
 
nkootstra profile image
Niels Kootstra • Edited

Personally I can't wait for the release of Jetstream. Creating this every time is so much work and since it is compatible with Livewire makes it so much better. I was really surprised when I watched the Laracon stream. Also looking forward how easy it will be to extend the features

Collapse
 
zubairmohsin33 profile image
Zubair Mohsin

Yeah... I am also looking forward to extending part.

Collapse
 
lperry65 profile image
Lee Perry

My issue with it is that it’s tied to Tailwind, What if I don’t want to use tailwind css. What if I prefer bootstrap or .....

With Tailwind UI being released primarily as a subscription service I won’t be using it.

So what’s the alternative, convert to Tailwind css or go without the functionality?

Collapse
 
zubairmohsin33 profile image
Zubair Mohsin

Well, if you need all this cool functionality, converting to TailwindCSS is the only option.
If you only need Authentication scaffolding with Bootstrap, you can still use "laravel/ui" package.

With Jetstream being open source, I think it's only matter of time before someone makes a package for Jetstream and Bootstrap too.

Collapse
 
lperry65 profile image
Lee Perry

Personally I feel it should have been a built in option. Like many Laravel dev's I'm already productive with bootstrap, and looking forward to V5. My frustration is partly due as I'm about to starts a new project which was going to be in Laravel 8, and now I'm not sure. Don't really want to use a deprecated UI package and I'm not going to switch to Tailwind, Might just go with Vue and Adonis ?

Livewire looks good though, I could see me using that ;)

Thread Thread
 
zubairmohsin33 profile image
Zubair Mohsin

Give it a read if you haven't already, Thoughts on some reactions to Jetstream, by Taylor.

Collapse
 
shoiabakbar profile image
Shoaib Akbar

This is wao ♥️

Collapse
 
zubairmohsin33 profile image
Zubair Mohsin

Thank you :)

Collapse
 
drsounds profile image
Alexander Forselius

Santa Claus come very early this year :-)

Collapse
 
zubairmohsin33 profile image
Zubair Mohsin

Haha... Brought lots of goodies.

Collapse
 
thiagotks2 profile image
thiagotks2

Laravel Jetstream is already avaliable?
In their github repo, the link to documentation is missing

Collapse
 
zubairmohsin33 profile image
Zubair Mohsin

Yeah repository was recently made public. They are working on documentation now.