Removing the Pain of User Authorization with Sentinel
Most non-basic multi-user applications need some roles and permission levels. If you ever used WordPress, you must have noticed that they have a super admin, admin, editor, author, etc. Simplifying the development and integration of a permission system is what Cartalyst’s Sentinel package is trying to accomplish. The package provides an API for dealing with users, groups, permissions, etc. In this article, we’ll use it to create a small demo app.
For our sample application in this tutorial, we will be using the Slim micro-framework and Vagrant. You can check out the final demo on Github to see the result. Let’s start by first requiring the necessary packages:
composer require slim/slim:~2.0 composer require twig/twig:~1.* composer require cartalyst/sentinel:2.0.*
composer require illuminate/database illuminate/events symfony/http-foundation ircmaxell/password-compat
Because working with users, groups and permissions requires some database interaction, we need to create our database with the necessary tables. If you are using Laravel you can install the database using the migrate command.
Continue reading %Removing the Pain of User Authorization with Sentinel%