32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | CatchAdmin [Just Like ~ ]
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
||
// +----------------------------------------------------------------------
|
||
// | Author: UCToo [ contact@uctoo.com ]
|
||
// +----------------------------------------------------------------------
|
||
|
||
use think\migration\Seeder;
|
||
|
||
class {CLASS} extends Seeder
|
||
{
|
||
/**
|
||
* 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()
|
||
{
|
||
$data = {DATA}
|
||
|
||
foreach ($data as $item) {
|
||
\catchAdmin\{MODULE}\model\{MODEL}::create($item);
|
||
}
|
||
}
|
||
} |