Download the PHP package maika-kanaka/ci3-eloquent without Composer
On this page you can find all versions of the php package maika-kanaka/ci3-eloquent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download maika-kanaka/ci3-eloquent
More information about maika-kanaka/ci3-eloquent
Files in maika-kanaka/ci3-eloquent
Download maika-kanaka/ci3-eloquent
More information about maika-kanaka/ci3-eloquent
Files in maika-kanaka/ci3-eloquent
Vendor maika-kanaka
Package ci3-eloquent
Short Description A simple eloquent for easier your life
License MIT
Package ci3-eloquent
Short Description A simple eloquent for easier your life
License MIT
Please rate this library. Is it a good library?
Informations about the package ci3-eloquent
CI3-ELOQUENT
A query builder++ on codeigniter3 for easier your life.
HOW TO USE
-
Step 1: Run this command in your codeigniter project
- Step 2: Extend your model & define your table name in property
METHOD
table(alias)
| Param | Type | Required | Description | | --- | --- | --- | --- | | alias | String | No | Given alias to your table, it's usefull when you're using join statement | Example 1: a simple query to get data Example 2: a simple query with join statement to get data
find(where)
| Param | Type | Required | Description | | --- | --- | --- | --- | | where | Array or Integer or String | No | Get the first row with where clause | ~ Example 1: get the first row with primary key ~ Example 1: get the first row with other column
find_or_404(where)
This method is exactly same as the find() method but if the return value is null then it will appear 404 page
insert(data)
| Param | Type | Required | Description | | --- | --- | --- | --- | | data | Array | Yes | Data to insert | ~ Example 1: Insert one row ~ Example 2: Insert multiple row bulk
update(where, set)
| Param | Type | Required | Description | | --- | --- | --- | --- | | where | Array | Yes | Specific data to be updated | | set | Array | Yes | Column & value to be updated |
updateIncrement(where, field_name)
| Param | Type | Required | Description | | --- | --- | --- | --- | | where | Array | Yes | Specific data to be updated | | field_name | String | Yes | Column & value to be updated | If the value of field jumlah_stok is 10 then the new value is 11
updateDecrement(where, field_name)
| Param | Type | Required | Description | | --- | --- | --- | --- | | where | Array | Yes | Specific data to be updated | | field_name | String | Yes | Column & value to be updated | If the value of field jumlah_stok is 10 then the new value is 9
delete(where)
| Param | Type | Required | Description | | --- | --- | --- | --- | | where | Array or Integer or String | Yes | Specific data to be deleted | ~ Example 1: where clause on primary key ~ Example 2: where custom field clause
primaryKeyInc()
If you're using this method. You must define your field primary key on property model Then, you can using this method & get the increment
primaryKey([opts])
Firstly, The same as the primaryKeyInc() method, you must define your field primary key on property model | Param | Type | Required | Description | | --- | --- | --- | --- | | format | String | Yes | Prefix for generate code, take it for example: If you want the return value is INV/202010/0001 so the format is **INV** | | separator | String | No | Separator for generate code, take it for example: If you want the return value is INV-202010-0001 so the separator is **-** | | digit_inc | Integer | No | Digit increment, Default value: 4 | reset_monthly | Boolean | No | Fill yearmonth in return value & reset the increment every month changed. Default value: TRUE | ~ Example 1: Generate code & reset increment every month ~ Example 2: Generate code & non reset increment
LICENSE
Usage is provided under the MIT License. See LICENSE for the full details.
All versions of ci3-eloquent with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6.0
The package maika-kanaka/ci3-eloquent contains the following files
Loading the files please wait ....