From 72cfc1fa6b694106a223af3d572dd4d37affa619 Mon Sep 17 00:00:00 2001 From: Sonny Gauran Date: Sun, 8 Sep 2013 21:26:58 +0800 Subject: [PATCH] Updating README.md to include initial role required. The roles required by Firadmin are found at `app/config/packages/firalabs/firadmin/config.php` and these needs to match with the role being specified by the user upon `artisan create:user --role="administrator"`. --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0def302..46b28e1 100644 --- a/README.md +++ b/README.md @@ -96,12 +96,29 @@ php artisan migrate --package="firalabs/firadmin" ##Create default user -You need to have at least one register user in your database. We provided a easy way to create a user using artisan command. +You need to have at least one register user in your database. We provided a easy way to create a user using artisan command. Use `--role=""administrator""` when setting up a user for the first time. ```bash php artisan create:user [--role[="..."]] username email password ``` +You can also change the role names Firadmin checks on `app/config/packages/firalabs/firadmin/config.php`. + +```php +'roles' => array( + /* + * Grant all privileges to the administrator roles. + */ + 'administrator' => true, + + /* + * Granted basics CRUD privileges to the user administrator role on the user resource. + */ + 'user_administrator' => array('user' => array('create', 'read', 'update', 'delete')) +) +``` + + ##Register dashboard controller You must set a route to the dashboard admin panel in `app/routes.php`. We provide a default dashboard controller for testing purpose.