Download the PHP package amranidev/laracombee without Composer

On this page you can find all versions of the php package amranidev/laracombee. 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 laracombee

StyleCI Build Status Version stable un-Version Laravel

Introduction.

Larcombee is a Recombee API package for Laravel, it provides a simple API implementation, to get recommendations based on the user's behaviours and interests, whatever you build using Laravel, an e-commerce, music marketplace or movies platform, a recommendation system is a must, that way you can guarantee users will spend more time on your platform.

What is Recombee?

An artificial Intelligence powered recommendation system service with an intuitive RESTful API & SDKs tailored by data scientists.

Want to know more about how it works? check this following link.

Getting started.

  1. Install Laracombee:

composer require amranidev/laracombee

  1. Add the service provider and the alias to config/app.php:

  2. Create a new instance in recombee.com

  3. Add databaseId and token to config/laracombee.php in your project.

Congratulations, you have successfully installed Laracombee!

Usage.

With Laracombe, the integration of your data is simple, as you may know, Recombee used the user-item based database to predict recommendation based on users interests and interactions, so, you have to address which Laravel eloquent model you want to use as user as well as item.

Go to App\User and add $laracombee that you want to be migrated to Recombee db and do the same for item.

Note: $laracombee property should always be static.

Configuration.

First thing first, define your default User and Item class in laracombee.php configuration file.

When you trigger a laracombee artisan command, it will automatically use those classes as a reference.

Other configuration options.

Commands.

Larcombe comes with a bunch of artisan commands that provides a fluent workflow for you, such as migrate, rollback, seed, add columns and drop columns.

Migration and Rollback commands.

As you remember, every time you trigger the migrate or the rollback command, Laracombee will look for $laracombee property and prepare the schema, you just have to specify which catalog you want to migrate/rollback (user/item) and provide the model namespace, Laracombee will do the job for you.

Migrate user : php artisan laracombee:migrate user

Migrate item : php artisan laracombee:migrate item

Rollback user : php artisan laracombee:rollback user

Rollback item : php artisan laracombee:rollback item

The Seed command.

If you want to index your users or items records that already exist in your database to recombee, you can run the seed command.

Note: Running this command may take several minutes, depends on your records.

Index user : php artisan laracombee:seed user

Index item : php artisan laracombee:seed item

Add/Drop columns.

You can add or drop columns with these following commands:

Add column : php artisan laracombee:add email:string age:integer --to=user

Drop column : php artisan laracombee:drop email age --from=user

Reset Command.

This command will completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request to be never executed in production environment! Resetting your database is irreversible, :warning: Think twice before running this command :warning:

Laracombee magic methods.

The package allows to manage recombee users/items through magic methods.

Example.

As you can see, we've used the magic method called addUser, which returns \Recombee\RecommApi\Requests\Request, then we triggered the send method to save the user in recombee database, let me tell you a little bit about the send method.

This method is the one responsible for sending a request to Recombee server, whenever you want your app to interact with Recombee, you probably need to trigger this method, adding a new user, adding an item, or even deleting it.

The send method always returns a promise, so it becomes easy for you to manage the response from the server.

You can also add multiple users as bulk to the Recombee database, if you want to, you can use addUsers magic method and pass an array of users through the parameter, then you must trigger batch method to send the request, using batch could be better when sending multiple requests at the same time.

You can also recommend items to user.

Note: Unlike the rest of the API, recommendation API triggers the send method automatically, so there will be no need to call send method.

Recommendation API returns an array response that contains an array of recommended (items ids) called recomms.

Other magic methods.

Update user, Laracombee::updateUser($user);

Merge users, Laracombee::mergeUsers($user1, $user2);

Add an Item, Laracombee::addItem($item);

Update an item, Laracombee::updateItem($item);

Add multiple items, Laracombee::addItems($items);

API.

Laracombee follows the same naming conventions as recombee, please check recombee api docs.

Users.

Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two together becomes desirable.

Merging happens between two users referred to as the target and the source. After the merge, all the interactions of the source user are attributed to the target user, and the source user is deleted.

Items.

User-Item Interactions.

The following method allow adding, deleting and listing of interactions between the users and the items.

Detail views

Purchases

Ratings

Cart additions

Bookmarks

Retrieve Recommendations

Recommendation methods are capable of recommending items (Recommend items to user, Recommend users to user).

Tailor your own magic methods.

Sometimes, we need to keep our code consistent, so we wish that we can extend the installed package functionality and adapt it to our needs.

You can tailor your API however you like, you can do that by extending the AbstractRecombee class and implement the send abstract method, then you're good to go.

Example:

Let's say that you don't like the way Laracombee handles recombee requests/response with promises, dealing with exceptions the way you want, and also, you need a method that can make a user as a top seller in the recombee database.

Lets create a new class, you can register it as a facade (if you would like to).

Then you can use these functionality in your project.

Using multiple recombee databases.

Laracombee gives you the flexibility to use multiple recombee databases, gives you the ability to create a custom class that you can use to interact with other recombee instance.

You can create a new Laracombee class with php artisan laracombee:new <ClassName>, it will create a new Laracombee class in app/Laracombee directory.

Contributing

Thank you for considering contributing to this project! The contribution guide can be found in Contribution guide.

Feel free to report any bugs, submit any feature request, or even ask any questions.

Todo


All versions of laracombee with dependencies

PHP Build Version
Package Version
Requires recombee/php-api-client Version ^4.0
guzzlehttp/guzzle Version ^7.4
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 amranidev/laracombee contains the following files

Loading the files please wait ....