Advanced Laravel | let's write authorize inside form request @laravelboy

preview_player
Показать описание
like , share and subscribe is great support .
Рекомендации по теме
Комментарии
Автор

Great . Learnt a lot of thing from you. Keep it up bro.
Please make tutorial on policy, provider, service, collection and resource with detail

irfan_majid
Автор

this is very nice i didn't even know you can do auth::loginUsingId(1); i still prefer policies, and im glad i came across your channel keep up the good work lol you sound like
Mohamed Said hahahhaa

kingstalker
Автор

I think if you use policy::can in authorize function it will be great idea

bosnad
Автор

great but if the logic is more complexity its not good idea because you will break ocp principle

abdallakaram
Автор

I don't think it's good idea. It's great only in such examples, but not in real projects. A lot of authentication logic is far more complex. Just imagine you have admin privileges that has access to every resource. Or role system with departments managers, which have access to everything in there's teams. In real live you don't want to keep authentication logic in different places even if it's simple in that case. All of it supposed to be in policies.

arkadiuszkozub
welcome to shbcf.ru