Easily connect your Laravel website with your Conscribo administration. Import your users, divide them in groups to support different access levels, and apply committees as roles (using spatie/laravel-permission).
The Conscribo API is available on Packagist. Installation via Composer is easy:
composer require gumbo-millennium/conscribo
After installation, publish the config file:
php artisan vendor:publish --tag="conscribo-config"
Next, add these three lines to your .env.example
file, and configure
them properly in your local .env
:
CONSCRIBO_ACCOUNT=
CONSCRIBO_USERNAME=
CONSCRIBO_PASSPHRASE=
You can now test the connection using the conscribo:authenticate
command.
To configure the API, you need to fetch the entity types from Conscribo and update your config/conscribo.php
file.
You can get a list of all entity types using conscribo:list-entities
.
Next, update the resource
keys in all objects
entries in your config to match one of the existing entity types.
Next, fetch the field names for all entity types you want to use. This is done by calling conscribo:entity-fields <entity-type>
.
Update the fields
in all objects
entries in your config to match the field names you got and want to receive in your application.
Now your connection is optimized and ready to use.
The easiest use is using the Conscribo
facade. This facade can list and search for users (optionally with groups) and for committees.
use Gumbo\Conscribo\Facades\Conscribo;
Conscribo::findUser($user->id);
Conscribo::searchUser([
'email' => $user->email,
]);
```php
$conscriboApi = new Gumbo\ConscriboApi();
$users = $conscriboApi->getUsers();
$groups = $conscriboApi->getGroups();
$roles = $conscriboApi->getRoles();
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.