awethemes/database

This package is abandoned and no longer maintained. The author suggests using the wplibs/database package instead.

WordPress database query builder, based on illuminate/database

v1.0.1 2018-09-28 04:49 UTC

This package is auto-updated.

Last update: 2022-02-01 13:14:44 UTC


README

Installation

composer require awethemes/database

Basic Example

<?php

use Awethemes\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