Download the PHP package kaizencoders/wp-eloquent without Composer
On this page you can find all versions of the php package kaizencoders/wp-eloquent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download kaizencoders/wp-eloquent
More information about kaizencoders/wp-eloquent
Files in kaizencoders/wp-eloquent
Download kaizencoders/wp-eloquent
More information about kaizencoders/wp-eloquent
Files in kaizencoders/wp-eloquent
Vendor kaizencoders
Package wp-eloquent
Short Description Eloquent ORM for WordPress
License LGPL-3.0-or-later
Homepage https://github.com/kaizencoders/wp-eloquent
Package wp-eloquent
Short Description Eloquent ORM for WordPress
License LGPL-3.0-or-later
Homepage https://github.com/kaizencoders/wp-eloquent
Please rate this library. Is it a good library?
Informations about the package wp-eloquent
Eloquent Wrapper for WordPress
This is a library package to use Laravel's Eloquent ORM with WordPress.
Package Installation
To install this package, edit your composer.json
file:
Now run:
$ composer install
Usage Example
Basic Usage
Creating Models For Custom Tables
You can use custom tables of the WordPress databases to create models:
Retrieving All Rows From A Table
Here users
is the table name without prefix. The prefix will be applied automatically.
Other Examples
Writing a Model
The class name Employee
will be translated into PREFIX_employees
table to run queries. But as usual, you can override the table name.
In-built Models for WordPress
- Post
- Comment
- Post Meta
- User
- User Meta
Filter Post
by post_status
and post_type
How it Works
- Eloquent is mainly used here as the query builder
- WPDB is used to run queries built by Eloquent
- Hence, we have the benfit to use plugins like
debug-bar
orquery-monitor
to get SQL query reporting. - It doesn't create any extra MySQL connection
Minimum Requirement
- PHP 5.6.4+
- WordPress 4.0+
Author
All versions of wp-eloquent with dependencies
PHP Build Version
Package Version
The package kaizencoders/wp-eloquent contains the following files
Loading the files please wait ....