Laravel Jetstream: First Look

Zubair Mohsin - Aug 29 '20 - - Dev Community

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

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player