Download the PHP package mcred/phpred without Composer
On this page you can find all versions of the php package mcred/phpred. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor mcred
Package phpred
Short Description Relationships, Entities and Datasources for PHP
License MIT
Package phpred
Short Description Relationships, Entities and Datasources for PHP
License MIT
Please rate this library. Is it a good library?
Informations about the package phpred
PHPRed
Description
PHPRed is an opinionated light weight ORM. While there are many available ORMs for PHP, many contain features that I have never used. PHPRed contains very basic methods and usage.
Requirements
- PHP 7.1+
- Composer
- Mysqli
Installation
Setup
In addition to the example below, there are examples available in the `tests/mocks` folder. Setting up a model is very easy: create a model class that extends the `PHPRed/Models/Model` class then define the properties of that model in the constructor. Such as:
Constructor Properties
- model: string
- table: string
- primaryKey: string
- foreignKey: string
- fields: array
- requiredFields: array
- uniqueFields: array
- hasMany: array
- belongsTo: array
- hasAndBelongsToMany: array
Methods
- getAll() : array
- getById(int $modelId) : array
- getBySearch(array ['key' => 'value']) : array
- insert(array $data) : array
- updateById(int $modelId, array $data) : array
- deleteById(int $modelId): void
All versions of phpred with dependencies
PHP Build Version
Package Version
Requires
vlucas/phpdotenv Version
^2.4
theseer/autoload Version ^1.23
joshcam/mysqli-database-class Version ^2.8
theseer/autoload Version ^1.23
joshcam/mysqli-database-class Version ^2.8
The package mcred/phpred contains the following files
Loading the files please wait ....