PHPackages                             compredict/ai-sdk-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. compredict/ai-sdk-laravel

ActiveLibrary[API Development](/categories/api)

compredict/ai-sdk-laravel
=========================

Compredict's AI Core API for laravel.

11.0kPHPCI failing

Since Jan 22Pushed 4y ago2 watchersCompare

[ Source](https://github.com/compredict/ai-sdk-laravel)[ Packagist](https://packagist.org/packages/compredict/ai-sdk-laravel)[ RSS](/packages/compredict-ai-sdk-laravel/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

COMPREDICT Service Provider for Laravel 5
=========================================

[](#compredict-service-provider-for-laravel-5)

This is a simple [Laravel](http://laravel.com/) service provider for making it easy to include the official [COMPREDICT SDK for PHP](https://github.com/compredict/ai-sdk-php) in your Laravel and Lumen applications.

This README is for version 1.x of the service provider, which is implemented to work with Version 1 of the COMPREDICT AI Core SDK for PHP and Laravel 5.x.

Installation
------------

[](#installation)

The COMPREDICT Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `compredict/ai-sdk-laravel` package in your project's `composer.json`.

```
{
    "require": {
        "compredict/ai-sdk-laravel": "dev-master"
    }
}
```

Then run a composer update

```
php composer.phar update
```

To use the COMPREDICT Service Provider, you must register the provider when bootstrapping your application.

### Lumen

[](#lumen)

In Lumen find the `Register Service Providers` in your `bootstrap/app.php` and register the COMPREDICT Service Provider.

```
    $app->register(Compredict\Algorithm\CompredictServiceProvider::class);
```

### Laravel

[](#laravel)

In Laravel find the `providers` key in your `config/app.php` and register the COMPREDICT Service Provider.

```
    'providers' => array(
        // ...
        Compredict\Algorithm\CompredictServiceProvider::class,
    )
```

Find the `aliases` key in your `config/app.php` and add the COMPREDICT facade alias.

```
    'aliases' => array(
        // ...
        'CP_Algo' => Compredict\Algorithm\CompredictFacade::class,
    )
```

Configuration
-------------

[](#configuration)

By default, the package uses the following environment variables to auto-configure the plugin without modification:

```
COMPREDICT_AI_CORE_KEY=
COMPREDICT_AI_CORE_USER=
COMPREDICT_AI_CORE_CALLBACK=
COMPREDICT_AI_CORE_FAIL_ON_ERROR=true
COMPREDICT_AI_CORE_PPK=Path/to/PPK.pem
COMPREIDCT_AI_CORE_PASSPHRASE=

```

To customize the configuration file, publish the package configuration using Artisan.

```
php artisan vendor:publish  --provider="Compredict\Algorithm\CompredictServiceProvider"
```

Update your settings in the generated `app/config/compredict.php` configuration file.

Usage
-----

[](#usage)

In order to use the COMPREDICT's AI Core SDK for PHP within your app, you need to retrieve it from the [Laravel IoC Container](http://laravel.com/docs/ioc). The following example gets all the algorithms allowed for the user.

```
$algorithms = App::make('CP_Algo')->getAlgorithms();
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcdf88c1da917a892275da84363277347d0a1d51aa7b118d7e79130229894b4e?d=identicon)[compredict](/maintainers/compredict)

---

Top Contributors

[![uzi0espil](https://avatars.githubusercontent.com/u/5475253?v=4)](https://github.com/uzi0espil "uzi0espil (16 commits)")[![fadighattas100](https://avatars.githubusercontent.com/u/8566982?v=4)](https://github.com/fadighattas100 "fadighattas100 (3 commits)")[![paspetsch](https://avatars.githubusercontent.com/u/25506451?v=4)](https://github.com/paspetsch "paspetsch (2 commits)")

### Embed Badge

![Health badge](/badges/compredict-ai-sdk-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/compredict-ai-sdk-laravel/health.svg)](https://phpackages.com/packages/compredict-ai-sdk-laravel)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
