32 lines
1.0 KiB
Plaintext
Raw Normal View History

2020-01-21 16:59:40 +08:00
<?php
2020-09-11 18:19:06 +08:00
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
2021-06-06 15:57:50 +08:00
// | Author: UCToo [ contact@uctoo.com ]
2020-09-11 18:19:06 +08:00
// +----------------------------------------------------------------------
2020-01-21 16:59:40 +08:00
use think\migration\Seeder;
2021-06-06 15:57:50 +08:00
class {CLASS} extends Seeder
2020-01-21 16:59:40 +08:00
{
/**
* Run Method.
*
* Write your database seeder using this method.
*
* More information on writing seeders is available here:
* http://docs.phinx.org/en/latest/seeding.html
*/
public function run()
{
2021-06-06 15:57:50 +08:00
$data = {DATA}
2020-01-21 16:59:40 +08:00
2021-06-06 15:57:50 +08:00
foreach ($data as $item) {
\catchAdmin\{MODULE}\model\{MODEL}::create($item);
}
2020-01-21 16:59:40 +08:00
}
}