Download the PHP package artjoker/laravel-scoring without Composer
On this page you can find all versions of the php package artjoker/laravel-scoring. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download artjoker/laravel-scoring
More information about artjoker/laravel-scoring
Files in artjoker/laravel-scoring
Package laravel-scoring
Short Description Integration of scoring systems for Laravel
License MIT
Homepage https://github.com/artjoker/laravel-scoring
Informations about the package laravel-scoring
Laravel Scoring
Integration of scoring systems for Laravel. The package provides integration scoring systems:
- RiskTools
Installation
You can install the package via composer:
You can publish the config file:
Set environment variable (.env
)
Usage
Get scoring data
You can get data from the scoring system as follows:
- 'risk_tools' - scoring system;
- $attributes - data (array) from the credit model according to the mapping of variables in
config/scoring.php
. This map establishes the correspondence between the attributes of your model and the required query fields in scoring system.
$result
- response from scoring system (array).
Send status of credit
Send status of credit to the scoring system as follows:
- 'risk_tools' - scoring system;
- $attributes - data (array) from the credit model according to the mapping of variables
Get the UBKI reports
Get the UBKI reports from the scoring system as follows:
- $public_id - ID of credit
Get pre-scoring data
You can get data from the pre-scoring system as follows:
- $social_number - Social number (INN) of client
Trait
Add ScoringTrait
-trait to the model with client data:
Add a new method scoringAttributes()
to the class to add the necessary attributes and fill them with data:
You can use other ways to create custom attributes that you specified in 'model_data'
(config/scoring.php
).
Logging requests to database
You have the option to save all Risk Tools requests in a database table.
To do this, you should set config parameter query_log
to true
and create table risk_tools_query_logs
with the following fields
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Volodymyr Taranenko
- All Contributors
License
The MIT License (MIT). Please see License File for more information.