PHPackages                             elphas/recommender - 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. elphas/recommender

ActiveLibrary

elphas/recommender
==================

The Elphas recommender is a service for your data. Send in the data, we do some analises and you get back recommendations.

06PHP

Since Oct 15Pushed 6y agoCompare

[ Source](https://github.com/elphas-dev/elphas-recommender-laravel)[ Packagist](https://packagist.org/packages/elphas/recommender)[ RSS](/packages/elphas-recommender/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Elphas Recommender for Laravel
==============================

[](#elphas-recommender-for-laravel)

The Elphas recommender is a recommendation service for your data. Send in the data, we do some analyses and you get back recommendations.

[How to install](#how-to-install)
[What does it do](#what-does-it-do)
[How to use](#how-to-use)
[Support](#support)

How to install
--------------

[](#how-to-install)

Go to your Laravel project where you would like to use Elphas Recommender and install via composer:

```
composer require elphas/recommender
```

Register API key and secret key for your app in the .env file

```
RECOMMENDER_APIKEY=
RECOMMENDER_SECRETKEY=

```

No Api key yet?

Sign up here: .
Create your first app and enter the keys in the .env file.

What does it do
---------------

[](#what-does-it-do)

The Elphas recommender is a recommendation service for your data. Send in the data, we do some analyses and you get back recommendations.

Let's look at an example:
If you have a user base who all have certain skills and you want to give your user suggestions on what to learn next.

What you would do with Elphas Recommender is the following:

You would create a collection ( this is a container for your specific data ) and supply it with the profiles. This can be done with complete anonymity.
A profile would look something like this:

```
{
   "id":1357, //this is an ID generated by us
   "items": //a set of skills that you supply for that user
   [
   	"html5",
   	"java"
   ],
   "reference_id":1 //this is an ID that perhaps matches an ID in your system for easier lookups later on
}

```

Based on a couple of profiles we can supply your profile with recommendation. Based on a collection with the above profile we could recommend the following:

```
{
   "augment":
   [
   	"mysql",
   	"php"
   ],
   "recommendation":
   [
   	"android",
   	"css3",
   	"jquery",
   	"wordpress",
   	"spring",
   	"ios",
   	"mysql",
   	"ajax",
   	"php",
   	"tomcat"
   ]
}

```

You could use different strategies to get recommendations. [Read more about strategies](#Recommendations)

How to use
----------

[](#how-to-use)

### Collections

[](#collections)

***List of your collections***

```
Recommender::getCollections();
```

***Create new collection***

```
Recommender::postCollection( 'Name of the collection' );
```

***Get specific collection by collection ID***

```
Recommender::getCollection( $collectionId );
```

***Change the name of the collection***

```
Recommender::patchCollection( $collectionId, $name )
```

***Delete the collection***
Be careful with this :)

```
Recommender::deleteCollection( $collectionId );
```

### Items

[](#items)

***Get the unique items in a collection***

```
Recommender::getItems( $collectionId );
```

### Profiles

[](#profiles)

***Get all profiles of a collection***

```
Recommender::getProfiles( $collectionId );
```

***Create new profile in a collection***

```
$profile = new \Elphas\Recommender\Profile();
$profile->items = [ 'laravel', 'vue', 'php', 'javascript' ];
Recommender::postProfile( $collectionId, $profile );

//or

$profile2 = new \Elphas\Recommender\Profile( null, null, [ 'laravel', 'vue', 'php', 'javascript' ] );
Recommender::postProfile( $collectionId, $profile2 );
```

Supply a reference id so that you can match the profile with your own system

```
$profileWithRef = new \Elphas\Recommender\Profile( null, $referenceId, [ 'laravel', 'vue', 'php', 'javascript' ] );
Recommender::postProfile( $collectionId, $profileWithRef );
```

***Get a profile in a collection***

```
Recommender::getProfile( $collectionId, $profileId);

//by your reference ID

Recommender::getProfile( $collectionId, $referenceId, true);

//as an Elphas Profile instance

$profile = Recommender::getProfile( $collectionId, $profileId, false, true);
```

***Update a profile in a collection***

```
$profile = Recommender::getProfile( $collectionId, $profileId, false, true);

$profile->items[] = 'blade';

Recommender::patchProfile( $collectionId, $profileId, $profile)
```

***Delete a profile in a collection***Again be careful with this.

```
Recommender::deleteProfile( $collectionId, $profileId)

//or by referenceID

Recommender::deleteProfile( $collectionId, $referenceId, true)
```

### Recommendations

[](#recommendations)

Once a collection has been filled with profiles and items we can do a recommendation for a profile, based on the other profiles in the collection.

```
Recommender::recommend( $collectionId, $profileId)
```

Recommendations can be done with three strategies: ***augment***, ***recommend*** or ***all***.

The default strategy for getting a recommendation is the ***recommend*** strategy. The ***recommend*** strategy compares profiles with each other.

The ***augment*** strategy checks which unique items belong together and how many times this happens.

The ***all*** strategy combines the strategies. The result will returned per strategy.

```
Recommender::recommend( $collectionId, $profileId, 'recommend' )

//or

Recommender::recommend( $collectionId, $profileId, 'augment' )

//or

Recommender::recommend( $collectionId, $profileId, 'all' )
```

When using the ***augment*** strategy you will be able to supply a minimal quality setting between 0 and 1.
The higher the quality the more strict a recommendation will be.

```
Recommender::recommend( $collectionId, $profileId, 'augment', 0.7 )
```

There is an option to limit the number of recommendations. The default is *10*:

```
Recommender::recommend( $collectionId, $profileId, 'augment', 0.7, 5 )
```

Recommendations based on your own referenceID is also possible:

```
Recommender::recommend( $collectionId, $referenceId, 'augment', 0.7, 5, true )
```

Support
-------

[](#support)

Email us at

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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/024e1fc1e848b28699d71e91d326fbecee969c106ec49015fbbc1931c48e341f?d=identicon)[Alledaags](/maintainers/Alledaags)

---

Top Contributors

[![gerbenrobijn](https://avatars.githubusercontent.com/u/16287772?v=4)](https://github.com/gerbenrobijn "gerbenrobijn (17 commits)")

### Embed Badge

![Health badge](/badges/elphas-recommender/health.svg)

```
[![Health](https://phpackages.com/badges/elphas-recommender/health.svg)](https://phpackages.com/packages/elphas-recommender)
```

PHPackages © 2026

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