Download the PHP package oanna/laravel-onfido without Composer

On this page you can find all versions of the php package oanna/laravel-onfido. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-onfido

A laravel wrapper for Onfido php SDK


Support us

Installation

You can install the package via composer:

Configure the package by calling the install command

Usage

This package gives you access to a trait and a model.

First the model OnfidoInstance::class is the model related to the onfido_instances table. This model store the onfido's related datas of the model (morph).

Then there is the trait Verifiable::class that is destinate for the model that need to be verified, for exemple User::class.

This will give you access to a lot of methods provided in the trait.

But the more important is the startVerification(Region|null $region = null, $attributes = [], $workflowId = null) one

When user start a verification. Call this method on the model instance. This method call a repository method OnfidoRepository::startVerification().

Alternatively, you can do it by the repository like that PS: It is recommended to pass by the trait method

The method startVerification() will manage onfido datas for the model instance. When its done it will return you an array of data (applicant_id, workflow_id, workflow_run_id, sdk_token).

This package have a default model to manage onfido datas. But you can disabled it by not migrate the table and override some methods of the Verifiable trait. First you will need to override the relation.

Then you will need to specified to the package that you use a different model. For this add this line to your AppServiceProvider.php :

You may need to override the createOnfidoInstance() method in the trait too if needed.

Be carreful if you override the model. Some methods in the trait depends on table's columns (started, verified, verified_at...) and if you don't have these in your custom one, you may have error.

IMPORTANT

This package doesn't provide some views or stuff to manage onfido sdk (Web or others). It let you manage your way to init Onfido SDK and transfer datas across all classes.

API

This package provides a Portal::class that is use to make API call. You can call the execute() method to make api call. This is a try catch method with a closure params.

This is a part of the code in the createWorkflowRun() method

To instantiate the Portal::class, you will need to set your API Token and a Region : By default when The Portal::class is construct, it calls the setApiToken() and provide the one in the config file

You can also provide an already created onfido Configuration::class in the only param of the initialize static method if you have one.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-onfido with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^10.0||^11.0||^12.0
onfido/onfido-php Version ^8.6
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package oanna/laravel-onfido contains the following files

Loading the files please wait ....