Download the PHP package palpalani/laravel-easyrec without Composer

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

Laravel EasyRec

Latest Version Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

What is EasyRec?

EasyRec is an open source recommendation engine system that provides personalized recommendations using a RESTful API.

The recommendation engine server

You can use the server and call the associated RESTful API maintained by the easyrec team or download easyrec and call the API on one of your servers.

For additional information, take a look at the easyrec website.

Use EasyRec with the server maintained by the team

This is the ready-to-go solution. You may want to use this if you don't want to configure another server dedicated to easyrec.

Configure your own easyrec server

Take a look at the easyrec installation guide.

Installation

PHP 8.0+ and Composer are required.

To get the latest version of Laravel Easyrec, simply add the following line to the require block of your composer.json file:

You'll then need to run composer install or composer update to download it and have the autoloader updated.

Fol old version of Laravel you need to register the extension with the blow information. Once Laravel EasyRec is installed, you need to register the service provider. Open up config/app.php and add the following to the providers key.

You can register the Easyrec facade in the aliases key of your config/app.php file if you like.

Configuration

To get started, you'll need to publish all vendor assets:

This will create a config/easyrec.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

Usage

Actions

The following variables are common to the actions methods.

Required parameters
Optional parameters

Errors

If an error occurs, an exception Antoineaugusti\LaravelEasyrec\Exceptions\EasyrecException will be thrown with one of the following code and message:

View

This action should be raised if a user views an item.

Function signature

Easyrec::view($itemid, $itemdescription, $itemurl, $userid = null, $itemimageurl = null, $actiontime = null, $itemtype = null, $sessionid = null)

Parameters

Non-null variables in the function signature are required.

Example response

The response will be returned as a PHP array.

Buy

This action should be raised if a user buys an item.

Function signature

Easyrec::buy($itemid, $itemdescription, $itemurl, $userid = null, $itemimageurl = null, $actiontime = null, $itemtype = null, $sessionid = null)

Parameters

Non-null variables in the function signature are required.

Example response

The response will be returned as a PHP array.

Rate

This action should be raised if a user rates an item.

Function signature

Easyrec::rate($itemid, $ratingvalue, $itemdescription, $itemurl, $userid = null, $itemimageurl = null, $actiontime = null, $itemtype = null, $sessionid = null)

Parameters

Non-null variables in the function signature are required. The rating value is an additional parameter.

Example response

The response will be returned as a PHP array.

Send a custom action

This action can be used to send generic user actions.

Function signature

sendAction($itemid, $itemdescription, $itemurl, $actiontype, $actionvalue = null, $userid = null, $itemimageurl = null, $actiontime = null, $itemtype = null, $sessionid = null)

Parameters

Non-null variables in the function signature are required. There are two addition parameters.

Example response

The response will be returned as a PHP array.

Recommendations

The following variables are common to the recommendations methods.

Required parameters
Optional parameters

Errors

If an error occurs, an exception Antoineaugusti\LaravelEasyrec\Exceptions\EasyrecException will be thrown with one of the following code and message:

Users also viewed

Users who viewed the specified item also viewed the returned items.

Function signature

Easyrec::usersAlsoViewed($itemid, $userid = null, $numberOfResults = 10, $itemtype = null, $requesteditemtype = null, $withProfile = false)

Parameters

Non-null variables in the function signature are required.

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Users also bought

Users who bought the specified item also bought the returned items.

Function signature

Easyrec::usersAlsoBought($itemid, $userid = null, $numberOfResults = 10, $itemtype = null, $requesteditemtype = null, $withProfile = false)

Parameters

Non-null variables in the function signature are required.

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Items rated good by other users

Users who rated the specified item "good" did the same with items returned by this method.

Function signature

Easyrec::ratedGoodByOther($itemid, $userid = null, $numberOfResults = 10, $itemtype = null, $requesteditemtype = null, $withProfile = false)

Parameters

Non-null variables in the function signature are required.

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Recommendations for user

Returns recommendations for a given user ID.

Function signature

Easyrec::recommendationsForUser($userid, $numberOfResults = 10, $requesteditemtype = null, $actiontype = "VIEW", $withProfile = false)

Parameters

Non-null variables in the function signature are required. There is an additional parameter

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

History for user

Returns items which were involved in the latest user actions.

Function signature

Easyrec::actionHistoryForUser($userid, $numberOfResults = 10, $requesteditemtype = null, $actiontype = null)

Parameters

Non-null variables in the function signature are required. There is an additional parameter

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Rankings

The following variables are common to the rankings methods.

Optional parameters

Errors

If an error occurs, an exception Antoineaugusti\LaravelEasyrec\Exceptions\EasyrecException will be thrown with one of the following code and message:

Most viewed items

Shows items that were viewed most by all users

Function signature

Easyrec::mostViewedItems($numberOfResults = 30, $timeRange = 'ALL', $requesteditemtype = null, $withProfile = false)

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Most bought items

Shows items that were bought the most.

Function signature

Easyrec::mostBoughtItems($numberOfResults = 30, $timeRange = 'ALL', $requesteditemtype = null, $withProfile = false)

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Most rated items

Shows items that were rated the most.

Function signature

Easyrec::mostRatedItems($numberOfResults = 30, $timeRange = 'ALL', $requesteditemtype = null, $withProfile = false)

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Best rated items

Shows the best rated items. The ranking only includes items that have an average ranking value greater than 5.5.

Function signature

Easyrec::bestRatedItems($numberOfResults = 30, $timeRange = 'ALL', $requesteditemtype = null, $withProfile = false)

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Worst rated items

Shows the worst rated items. The ranking only includes items that have an average ranking value less than 5.5.

Function signature

Easyrec::worstRatedItems($numberOfResults = 30, $timeRange = 'ALL', $requesteditemtype = null, $withProfile = false)

Example response

The response will be returned as a PHP array.

Retrieving your models

Note that your models can be retrieved using this simple code:

If you want to keep the order of the items, you can use this code if you are using MySQL:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Credits

License

The Apache License. Please see License File for more information.


All versions of laravel-easyrec with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^8.0|^9.0|^10.0
illuminate/session Version ^8.0|^9.0|^10.0
guzzlehttp/guzzle Version ^6.3|^7.0
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 palpalani/laravel-easyrec contains the following files

Loading the files please wait ....