1. Go to this page and download the library: Download ajiho/think-phinx 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/ */
use ajiho\phinx\Seeder;
class UserSeeder extends Seeder
{
//让填充文件按顺序执行
public function getDependencies()
{
return [
'UserSeeder',
'ShopItemSeeder'
];
}
public function run() : void
{
//...
}
}
bash
php think 指令 -h
bash
php think migrate:breakpoint -h
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.