Custom Scripts
Sometimes we need to write some temporary scripts, which can call any class or interface like webman, to perform operations such as data import, data update statistics, etc. This is already very easy in webman, for example:
Create scripts/update.php
(please create the directory if it does not exist)
<?php
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../support/bootstrap.php';
use think\facade\Db;
$user = Db::table('user')->find(1);
var_dump($user);
Of course, we can also use webman/console
to create custom commands to achieve such operations, see Command Line