abkrim's avatar
Level 13

Jetstream or Spatie Permissions please give me advice

Hello

I am looking for the best use to use, for an app in which the dashboard has the following characteristics.

SuperAdmin can see, and edit everything. The administrator users of your domain can only create and carry out some operations with the final users of your domain, and some administrative with the domain. end users who belong to that domain and only have permission to see their tell me change the password and some other operations.

It's basically a backend for a multidomain mail system, based on Postfix.

After doing an installation of Laravel jetstream and trying to create some elements (admin and users) it has not convinced me, because I think that in the end I have to make many changes, which will cost me time that I am not interested in.

I'm comfortable with Laravel + Livewire and have grown fond of using Vemto for the original deployment.

I thought about Laravel Spatie Permissions, and I think it would be the best option, but I'm not sure if this is the best option.

0 likes
3 replies
jlrdw's avatar

Why not use authorization and authentication native to laravel (see chapter on authentication). Just my opinion, but after trying jetstream, breeze, fortify, etc, I decided to just use laravel's plain and regular authentication and I have my own custom authorization borrowed from my old java ee days. But it works hand in hand with laravels authentication.

By the way spatie uses laravels authorization, so go with spatie is my suggestion.

CamKem's avatar

I am using jetstream for authentication & authorisation & spatie permissions for the Role & Permission. They work hand in hand well for me, I cant see the need for anything more complex at this point, plus the spatie documentation & ongoing development support is probably the best of all the Roles & Permission packages I looked at.

Aside from Laracasts - there is a great tutorial on youtube by Laraveller called Inertia Move App - which goes into depth on how to use the spatie package. Here is the link: https://www.youtube.com/watch?v=ZvFGIGBUMY4

PovilasKorop's avatar

I think you need THREE things here:

  • Starter kit with Auth: Jetstream/Breeze/other
  • Role/permission package: Spatie or build your own functionality with Laravel Gates
  • Multi-tenancy functionality: so features and roles per domain if I understood it correctly. The best package for it is stancl/tenancy: https://tenancyforlaravel.com/ - or, again, you can build it yourself with Global Scopes

But in all those choices, it's your personal preference which to use. You tried Jetstream, it didn't fit? Try something else.

1 like

Please or to participate in this conversation.