Laravel Vue SPA Issue Tracker part 10: roles and permissions structure

preview_player
Показать описание
Today on our Laravel vue SPA issue tracker part 10 we are going to build our structure for roles and permissions. This means that we create the migrations, the models and the relations between them with a few helpers to add permissions to users and roles.

We didn't test this because we are going to test it on the next few episodes when we are going to use it. Obviously this is not complete and we need to add a few more helpers later.

Рекомендации по теме
Комментарии
Автор

Greetings, how can the implementation be done using spatie/permission? and deprive the views or menu in vue js

Lizlihezaigonzalesromero
Автор

This is the most basic setup for the roles and permissions, usually the packages are used for this "repetitive" code, we can still add some more logic for example maybe we want to add arrays of permissions instead of multiple ones with ", " between them or to accept either slugs or ids. That's another day issue! For questions, leave down a comment and I will respond as fast as I can!

ProgrammingwithPeter
Автор

It says in file /Traits/HasPermissions 'use App\Permissions' was never used, and $this->permissions is not being recognized, any tips?

zygimantasjasiunas
Автор

I genuinely think the migrations just messing the whole thing, and that they are just a stupid convention which comes with Laravel. I think we would be better of if we don't use them at all and directly write the raw MySQL code. :D I find writing the raw MySQL code easier than using the migrations, which are just further adding the theory behind the Laravel's way of doing things.

Anyway, watching your videos, I found you pretty well understand Laravel and Vue environment. For how long you're programming, Peter?

stefan
Автор

Did Peter commit today's work?




Yes.

kmata
Автор

hey I am 18 yrs old doing web dev for 3+ yrs..
stack: PHP/Laravel, JS/jQ,
soon my highschool will come to an end and I will need to find a job.. I tried freelancing but can't land a Job.. can you reply and leave some tips about freelancing and what to do for next 6 months while I am still in school, thanks

backtrackgreyhat
Автор

why dont you use Shinobi or Laravel/Permissions? great video btw.

mtzrmzia
Автор

I predicted what happened from 29:43 to 29:50

MRCMMT