I am trying to figure out which package is best to use with laravel (for user roles and permission. I have read little bit about Sentry & Entrust), there are many more of these packages. So can someone recommend a solution which is having a good documentation and video tutorials.
@zaheen what do you want to accomplish, as often, it is more difficult to try and shoehorn a fully-featured (big) third-party package into a smaller app, with smaller needs.
There are plenty of lessons here about users, and roles which may be of help to you. Again, it comes down to what you are building and what you're comfortable with. If you've read or at least seen the documentation then you can make up your own mind. The fact that you're asking this question says to me that you should start off small, and build upon that.
Lol. Never heard of it. And you know why? Because my package is actually older, so it might be the other way round ;-). Please have a close look before you write something.
I didn't use it however as there were still some parts of the documentation I didn't really understand (Maybe someone can write a tutorial on it?) But it looks very flexible. Not sure how it compares to the packages mentioned by others.
@RomainLanz what will the next major release include?
Imo sentry is NOT the solution for Laravel. It is a general PHP solution that is trying to fit into laravel. To much overhead and bloat.
Utilize ones like mentioned above if you feel the need. Most everyone I have worked with though has developed there own implementation. Generally speaking 3 to 4 tables and two models. Literally 10-20 lines of code and done. Granted it isn't the easiest thing to grasp for a beginner yet a fundamental requirement for any project.
If is is a really small app you can get by with a boolean values in a user or another related table.
@zaheen I recommend creating your own, it's easier to adapt than third party packages! Besides, if you like particular ideas from a several packages you can incorporate them into your own.
@maytham honestly I am not a good programmer, this is why I am trying to use a framework like Laravel to make things easier, infect I need a pre-build package for my authentication and authorization with roles and permission. https://github.com/BeatSwitch/lock-laravel seems interesting and promising but the problem for me is there is lack of tutorials on how to use it. Thank you very much for your support. I hope someone will come up with a clear guidance and tutorials. Thank you all for your smart responses.
@zaheen honestly, if as you say "I am not a good programmer" then you will find it harder to integrate another package rather than building your own. Of course this depends on the complexity.
@mstnorris & @jekinney Thanks for your comment & suggestion, But I am trying to use Laravel instead of a CMS. I am very enthusiastic to learn and do it with Laravel.
@kumarramalingam That is a bold statement. Sentry is a good package, but is not the best for every situation. Matter of fact I argue it is far from it for Laravel as Sentry is a PHP plugin not a laravel plugin. Lots of overhead, bloated file and script sizes. I would guess 50% of methods and function you will not use per app.
Here is how I implemented the caffinated/shinobi package: https://github.com/illuminate3/rakko
I've just added some dynamic menus and will be working on a cms module for my boiler/starter/basic application.
@jekinney I think this is the best suggestion as learning all the nuances of what is going on will give you greater piece of mind with your app. Beyond this cast https://laracasts.com/lessons/users-and-roles can anyone suggest a good tutorial (perhaps using L5)?
Oops! @maytham missed your comment above. Will start there thanks!
Laravel 5.1.11 introduced Policy which should handle much of the role responsibility features. I'm sure Jeffrey will be doing a lesson on it soon, as it seems like an incredible update.
Take a look at the docs. It likely handles most of the sticky problems people encounter when building their own auth system.