Download the PHP package coding-socks/reloquent without Composer

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

Reloquent

Redis + Eloquent = Reloquent

Introduction

Reloquent is an experimental object-relational mapper (ORM) that makes it enjoyable to interact with Redis. In addition to managing Redis hashes, Reloquent models allow you to search records with RediSearch.

This library is heavily inspired by Redis OM.

Define a model:

Create a new model and save it:

Search for models:

Getting Started

First things first, get yourself a Laravel project.

composer create-project laravel/laravel example-app

Once you have a composer.json, add our package to it:

composer require coding-socks/reloquent

You'll need Redis, preferably with RediSearch. The easiest way to do this is to set up a free Redis Cloud instance. But, you can also use Docker:

docker run -p 6379:6379 --name reloquent redislabs/redismod:preview

Configure Redis as a database

Open config/database.php and add a Redis driver based connection.

Everything else will come from your redis configuration.

Create, Fetch, Update, and Delete a model

A model only needs a schema when RediSearch is available to manage indexes. When only HASH or JSON data types are managed then it's not necessary.

Once it's done we can already do some simple query.

Using RediSearch

Querying a model

When schema is not defined Reloquent will try to guess the type of the field from the type of the query value. In most cases it is better to define a schema for each model.

Migrations define the index of your models. It is managed separately to be able to change it separately:

After running a migration we can query the newly created index.

Pagination

Not supported yet.

Counting

Not supported yet.

Using RedisJSON

Not supported yet.

Caveats

Config

prefix inside Redis config is ignored.

PhpRedis

\Redis::OPT_REPLY_LITERAL is set to true for PhpRedis which disables the basic string to boolean value transformation for rawCommand. If you use rawCommand in your application be aware of this.

Missing records

Redis, and by extension Reloquent, doesn't differentiate between missing and null. Missing fields in Redis are returned as null, and missing keys return null. So, if you fetch an entity that doesn't exist, it will happily return you an entity full of nulls:

It does this because Redis doesn't distinguish between missing and null. You could have an entity that is all nulls. Or you could not. Redis doesn't know which is your intention, and so always returns something when you call find.

Ordering

Only the latest orderBy is taken into account because of a RediSearch limitation. There is already an issue open which asks for multiple sort.

Production readiness

This project is still in alpha phase. In this stage the public API can change multiple times a day.

Beta version will be considered when the feature set covers most of the eloquent methods.

Contribution

Any type of contribution is welcome; from features, bug fixes, documentation improvements, feedbacks, questions. While GitHub uses the word "issue" feel free to open up a GitHub issue for any of these.


All versions of reloquent with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
illuminate/contracts Version ^8.68
illuminate/database Version ^8.68
illuminate/pagination Version ^8.68
illuminate/support Version ^8.68
robinvdvleuten/ulid Version ^5.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 coding-socks/reloquent contains the following files

Loading the files please wait ....