PHP code example of morningtrain / wp-database
1. Go to this page and download the library: Download morningtrain/wp-database 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/ */
morningtrain / wp-database example snippets
Database::setup(__DIR__ . "/database/migrations");
// Foo.php
namespace MyProject\App\Models;
/**
* @property int $id
* @property string $title
*/
class Foo extends \Illuminate\Database\Eloquent\Model
{
public $timestamps = false;
protected $table = 'foo';
}
\Morningtrain\WP\Database\Database::migrate();