wplibs/database

WordPress database query builder, based on illuminate/database
1,220 4
Install
composer require wplibs/database
Latest Version:1.0.0
PHP:>=5.6.0
License:MIT
Last Updated:Nov 10, 2018
Links: GitHub  ·  Packagist
Maintainer: anhskohbo

WordPress Database Build Status

Installation

composer require wplibs/database:^1.0

Usage

Basic Example

<?php

use WPLibs\Database\Database;

$builder = Database::newQuery()->select( '*' )->from( 'posts' );

var_dump( $posts = $builder->get() );

var_dump( $builder->toSql() ); // select * from `{$wpdb->posts}`

The query above can be shorten by this:

$posts = Database::table( 'posts' )->get();

Documents

https://laravel.com/docs/5.4/queries

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

637,827,751 9,703
laravel/framework

The Laravel Framework.

589,172,971 34,950
laravel/tinker

Powerful REPL for the Laravel framework.

498,216,183 7,442
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

413,412,504 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP License
1.0.0 >=5.6.0 MIT