Skip to content

agussuroyo/eloquent-wpdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

$wpdb with Eloquent from Laravel

PHP Validator

  • I made this just for personal use
  • I do not guarantee anything for the use of this software
  • Do It With Your Own Risk

Installation

Using composer

composer require agussuroyo/eloquent-wpdb

Usage

Boot it first

$db = new \Agussuroyo\EloquentWpdb\DB();
$capsule = $db->capsule();

then do manual query builder

// query builder
$con = $capsule->getConnection();
$con->table('tableName')->get();

or model based query

// model based
class ModelName extends Illuminate\Database\Eloquent\Model
{
    
}

$all = ModelName::get();
$item = ModelName::find(123);
// do another Laravel query that we want...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages