Download the PHP package phuongtt/genie without Composer

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

Genie

Latest Version Build Status Coverage Status Total Downloads

Introduction

A base repository class for Eloquent with convenience methods that cover most queries. Useful to abstract away your persistence layer from your business code.

Dedicated to Genie

Dedicated to the World's best (and only) Genie in a bottle. Congrats on the freedom my man.

Installation

For Laravel 5.4 and above

For Laravel 5.3 and below

Implementation

The examples will use a hypothetical Eloquent model named User.

Options

Genie is already integrated with Phuongtt\Bruno. See Bruno documentation for more information. The $options key given by all get-methods takes the following format:

Parameter Value type Description
includes array Array of relationships to eager load
sort array Array of sorting rules, e.g. [['key' => 'username', 'direction' => 'ASC']]
filter_groups array See Bruno documentation
limit int Rows per page
page int The page to start from (use with limit)

Note: If you use the controller of Bruno it will automatically parse the request's query string into the correct format.

API

The examples will use a hypothetical Eloquent model named User.

get (array $options = [])

Get all User rows

getById ($id, array $options = [])

Get one User by primary key

getRecent (array $options = [])

Get User rows ordered by created_at descending

getRecentWhere (string $column, mixed $value, array $options = [])

Get User rows where $column=$value, ordered by created_at descending

getWhere (string $column, mixed $value, array $options = [])

Get User rows where $column=$value

getWhereArray (array $clauses, array $options = [])

Get User rows by multiple where clauses ([$column1 => $value1, $column2 => $value2])

getWhereIn (string $column, array $values, array $options = [])

Get User rows where $column can be any of the values given by $values

getLatest (array $options = [])

Get the most recent User

getLatestWhere (string $column, mixed $value, array $options = [])

Get the most recent User where $column=$value

delete ($id)

Delete User rows by primary key

deleteWhere ($column, $value)

Delete User rows where $column=$value

deleteWhereArray (array $clauses)

Delete User rows by multiple where clauses ([$column1 => $value1, $column2 => $value2])

Standards

This package is compliant with PSR-1, PSR-2 and PSR-4. If you notice compliance oversights, please send a patch via pull request.

Testing

Contributing

Please see CONTRIBUTING for details.

License

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


All versions of genie with dependencies

PHP Build Version
Package Version
Requires illuminate/database Version >=4.0
phuongtt/bruno Version ~3.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 phuongtt/genie contains the following files

Loading the files please wait ....