1. Go to this page and download the library: Download prappo/wp-eloquent library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prappo / wp-eloquent example snippets
use Prappo\WpEloquent\Application;
Application::bootWp();
use Prappo\WpEloquent\Support\Facades\DB;
$users = DB::table('users')->where('votes', '>', 100)->get();
use Prappo\WpEloquent\Support\Facades\DB;
$results = DB::select('select * from users where id = ?', [1]);
use Prappo\WpEloquent\Support\Facades\Schema;
Schema::create('users', function ($table) {
$table->increments('id');
$table->string('email')->unique();
$table->timestamps();
});
class User extends Prappo\WpEloquent\Database\Eloquent\Model {}
$users = User::where('votes', '>', 1)->get();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.