1. Go to this page and download the library: Download fanqingxuan/gen-models 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/ */
fanqingxuan / gen-models example snippets
class Base {
public function __construct() {
}
public function find() {
}
public function findAll() {
}
public function update() {
}
public function query() {
}
public function insert() {
}
}
class User extends Base {
}
class Post extends Base {
}
class User {
public $primaryKey = 'user_id';
public static function tableName() {
return "tbl_users";
}
}