Download the PHP package activix/simple-eloquent without Composer

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

Simple eloquent extension for Laravel

Latest Version Software License Quality Score Coverage Status Total Downloads

This extension presents some methods for eloquent ORM in order to reduce time and memory consumption. Sometimes application doesn't need all of eloquent overhead. It just requires to retrieve model's attributes with relations and nothing more. In this case this methods might be enough useful for you.

Extension supports:

- eloquent relations
- illuminate pagination
- PDO::FETCH_OBJ and PDO::FETCH_ASSOC fetch modes

Requirements

laravel >= 5.3

Installation

Run

or add this code line to the require section of your composer.json file:

Usage

Just use SimpleEloquent trait in your model. If you want to get models with relations attach SimpleEloquent trait to related models as well.

Then use simple() method in chain of methods calls.

Profit

Example 1 - users with details; 50 per page
Time Memory consumption
get() 0.62s 6.0mb
simple()->get() 0.19s 3.0mb
Example 2 - select models with 5-level relation
Time Memory consumption
get() 1.48s 28.5mb
simple()->get() 0.47s 15.5mb
Example 3 - let's select 1000 models
Time Memory consumption
get() 0.22s 2.0mb
simple()->get() 0.06s 1.1mb

What do you lose?

Since this extension provides less expensive methods you'll definitely lose some functionality. Basic methods return collection of eloquent models in contrast to new functionality which returns collection of stdClasses|arrays. This example will show the difference between results.

get() returns
simple()->get() returns

Since you'll get stdClasses|arrays you won't reach out to casting, appends, guarded/fillable, crud and another possibilities. That's why new methods are much faster :smirk:


All versions of simple-eloquent with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
illuminate/database Version ^8.0|^9.0|^10.0
illuminate/support Version ^8.0|^9.0|^10.0
illuminate/pagination Version ^8.0|^9.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 activix/simple-eloquent contains the following files

Loading the files please wait ....