Download the PHP package snowbuilds/laravel-mirror without Composer

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

Latest Version on Packagist Total Downloads GitHub Actions

Introduction

Bring your user experience to the next level! Laravel Mirror lets you suggest content to your users intelligently! Easily recommend blog posts, products, recipes, books, etc., with pure PHP! Start by registering a recommendation strategy and routinely updating recommendations in a CRON job!

Installation

You can install the package via composer:

Usage

Registering a strategy is as simple as comparing two values! We added some utilities for convenience. For example, recommending blog posts with similar titles:

Weighted Averages

It is possible to combine algorithms! For example, suggesting posts with similar titles and tags. Adding weights will give fields precedence. Larger numbers have higher precedence. We made the title field score higher in a recommendation engine than the tags:

Different Properties in the Same Calculation

You can add a second parameter to the utility method when comparing properties with different names. For example, users should see posts based on their biography and followed communities:

Custom Scoring algorithms

When the helper utilities are insufficient, you can invoke custom algorithms using the using method. The first value, $a, is the model that has recommendations, and the second value, $b, is the model being suggested:

Combining Weights with Custom Algorithms

Weights can also be applied to custom algorithms. The weights are applied in the order that the algorithm was registered. Our custom title comparator will take precedence over our tag comparator:

Managing Multiple Algorithms and Weights

The code becomes hard to read when using multiple custom algorithms and weights. If you use an associative array, you can keep your algorithms and weights organized:

Macros - Extracting Algorithms

When your custom algorithm is too cumbersome, you can extract it into a macro. We use an internal utility for registering algorithms, which you are free to use in your macros. This will create a clean utility API ->huggingFace for our user model:

Relationships

You can define a relationship between the model and the suggested content using the morphsRecommendation method. The content is ordered by the most suggested content:

Generating Recommendation Matrix

Calculating recommendations is resource-intensive. Laravel Mirror provides a command for syncing recommendations. After syncing, the recommendations are stored in the database and you will be able to fetch related suggestions:

In production, this should be a CRON job or registered in the Laravel kernel.

Roadmap

Testing

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-mirror with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/console Version ^10.15|^11.0
illuminate/container Version ^10.15|^11.0
illuminate/contracts Version ^10.15|^11.0
illuminate/filesystem Version ^10.15|^11.0
illuminate/pipeline Version ^10.15|^11.0
illuminate/support Version ^10.15|^11.0
oefenweb/damerau-levenshtein Version ^3.0
php-ai/php-ml Version ^0.10.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 snowbuilds/laravel-mirror contains the following files

Loading the files please wait ....