PHP code example of theday-seeyou / web-base-core
1. Go to this page and download the library: Download theday-seeyou/web-base-core 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/ */
theday-seeyou / web-base-core example snippets
use WebBase\Core\Controller;
use WebBase\Core\BaseModel;
use WebBase\Core\Model;
use WebBase\Core\service\AdminService;
final class Article extends BaseModel
{
}
Article::mQuery(); // 仅正常数据,自动添加 deleted_at IS NULL
Article::mRecycleQuery(); // 仅回收站数据
Article::mAllQuery(); // 正常数据和回收站数据
Article::mDelete(); // 软删除
Article::mRestore(); // 恢复
Article::mForceDelete(); // 从回收站永久删除
$this->createTable('articles')
->addColumn('title', 'string', ['limit' => 200])
->create();