agussuroyo / eloquent-wpdb
$wpdb that wrapped with Eloquent from Laravel
dev-main
2023-09-08 16:40 UTC
Requires
- illuminate/database: ^8.83
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-12-08 19:46:51 UTC
README
- 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...