Spatie Laravel Permission: Example Project Review

preview_player
Показать описание
Today I'm reviewing a popular package Laravel Permission by Spatie, based on its usage in another open-source project called Mealing.

Related resources:

- - - - -
Support the channel by checking out our products:
Рекомендации по теме
Комментарии
Автор

I love this package. I've used it in 4 different production projects.

schoolfaqs
Автор

In fact, the "hack" to grant permissions to "Super Admin" is advised and explained in the docs of Spatie Laravel Permission

o_lobato
Автор

Thank you! We love your videos and thoughs!

turdakhov
Автор

Nice tutorial, very clear and understandable. Что думаете на счет того, чтобы вынести все эти строки в константы и использовать уже их а не писать везде строки?

localusercamp
Автор

Whats the differencia of using middlewares in the controller rather than Gates like in the video ? I mean, the first protects de routes, and the other only provides if the user has authorization, right ?

ernestofavio
Автор

Could you maybe make a video about the new Teams permission feature in the spatie-permission package?

bloglives
Автор

im getting the "there is no permission named has anyone else come across this when trying to seed?

tim.bogdanov
Автор

Thanks a lot Povilas!!!

Do you plan or recording about FILAMENT ADMIN???

josuebarros-desenvolvedorw
Автор

omg i love you all my proplem solved by you

hajerghinnewah
Автор

What database client you are using sir?

bernielorbis
Автор

The fk. I wish I heard about this package a few months ago. It would've saved my ass from hrs. of debugging.

jovincebrillantes
Автор

$this->authorize() didnt work when we use api

amrullahdev
Автор

Thanks a lot to introduce these packages
How can we send our projects yo review?

mohammadmohammadi
Автор

Thanks a lot Povilas.
I have a problem with spatie permission in resource routes, I can't define each route with specific permission do you please have any idea how to set the permission for resource routes in web.php
NB : i know i can Defined them in controller constructor but i'm preferring to find a way in web.php

Thank you in advance

karimchatoine
Автор

I would like to ask how it exactly works: How is the role connected with user table ? In example: I have already existing table users with all users, do I have to create any column which has to be connected with table "roles" from the spatie package, or its somehow directly connected with roles table just thanks to that trait line code in model ?

MatejSK
Автор

Why permissions and roles cache not working? after get user with permission or roles, always query from db. I need caching this

ArislanHaikal
Автор

thanks, what if changed table name from user to admin, how can work with this packag

cethartest
Автор

Great, I have integrated Jetstream with spatie, all right but only one problem with roles of spatie not working when show the profile page of Jetstream livewire. I have created two roles: Admin and User, and I have created too Roleseeder with permission and roles for all page and profile, but profile page not working with spatie and "User" role show error 404, what's going on? Do you have one idea?

Thanks

Avefenixfuego
Автор

Hi, can you also make a video for laratrust?

sulaimanmisri
Автор

I went through the docs but I have a question

Let's say we have ability to create schools

And we can add admin to that school

Now how do you check if an admin is trying to change something that belongs to another school

I'll probably make a function like

Public static function($school_id){
return auth()->user()->school === $school_id;
}

Is there any way to achieve this

yungifez