Download the PHP package tareef/laravel without Composer
On this page you can find all versions of the php package tareef/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tareef/laravel
More information about tareef/laravel
Files in tareef/laravel
Package laravel
Short Description Official Laravel SDK for the Tareef face-recognition API — register, verify, and manage people in one line of code.
License MIT
Homepage https://tareef.io
Informations about the package laravel
Tareef for Laravel
The official Laravel SDK for Tareef — register a person, verify a face, manage your library, in one line of code.
Requirements
- PHP 8.2+
- Laravel 10, 11, 12, or 13
- A Tareef account (sign up free)
Install
The package self-registers via Laravel's auto-discovery. Add your API key to .env:
Grab your key from the Tareef dashboard → API Keys → Create new key.
Optionally publish the config to tune timeouts / retries:
Quickstart
Enroll a person
Verify a face
Compare two faces (1:1)
Measure how similar two images are without enrolling anyone — ideal for KYC ("does this selfie match this ID photo?"). A no-match is not an exception.
Add more reference photos
List your library
Delete a person
Health check
Error handling
Every failure path throws a typed exception subclassed from Tareef\Laravel\Exceptions\TareefException.
Tareef::verify() and Tareef::compare() are different: a no-match is not an exception — they return a result object with matched/match set to false. Only auth, quota, "no face in the image", and network errors throw.
API reference
| Call | Returns | Throws on … |
|---|---|---|
Tareef::register($name, $images, $phone?) |
Person |
duplicate face, no face, auth, quota |
Tareef::verify($image) |
VerifyResult |
no face, auth, quota, network |
Tareef::compare($imageA, $imageB) |
CompareResult |
no face, auth, quota, network |
Tareef::find($uuid) |
?Person (null = not found) |
auth |
Tareef::findOrFail($uuid) |
Person |
not found, auth |
Tareef::list($limit = 100) |
Collection<Person> |
auth |
Tareef::addImagesTo($uuid, $images) |
Person (refreshed) |
not found, auth, quota |
Tareef::delete($uuid) |
true |
not found, auth |
Tareef::health() |
bool |
never throws |
Person
VerifyResult
CompareResult
Configuration
config/tareef.php (publish to override):
| Key | Env var | Default | Notes |
|---|---|---|---|
api_key |
TAREEF_API_KEY |
— | Required. Bearer token, treat like a password. |
base_url |
TAREEF_BASE_URL |
https://tareef.io |
Override for self-hosted Tareef. |
timeout |
TAREEF_TIMEOUT |
30 |
Per-request, seconds. |
retries |
TAREEF_RETRIES |
2 |
Transient-failure retries before throwing. |
throw_on_quota |
TAREEF_THROW_ON_QUOTA |
true |
Set to false to receive failure results instead of QuotaExceededException. |
Image inputs
Every method that takes images accepts any of:
\Illuminate\Http\UploadedFile— straight from$request->file('photo')\SplFileInfo/\Illuminate\Http\File— for files you've already movedstring— an absolute path on disk
The SDK streams them as multipart parts; nothing is loaded fully into PHP memory.
Testing your integration
Tareef uses Laravel's HTTP client under the hood, so you can mock it with the standard Http::fake():
Versioning
Semver. The first stable release is 1.0.0. Any breaking change to the public API (Tareef::*, the resource DTOs, or the exception hierarchy) bumps the major version.
License
MIT. See LICENSE.
Links
- Tareef dashboard — https://tareef.io
- API reference — https://tareef.io/docs
- Status — https://tareef.io/status
- Support — [email protected]
tareef-laravel
All versions of laravel with dependencies
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0