Exemplo n.º 1
0
 public function run()
 {
     // FeeType::create([
     // 	'item_id' => 1,
     // 	'category' => '普通充值',
     // 	'item' 	=> '普通充值',
     // 	'number' => ,
     // 	'flow_direction' => 1,
     // 	'user_type' => 0
     // ]);
     // FeeType::create([
     // 	'item_id' => 1,
     // 	'category' => '普通充值',
     // 	'item' 	=> '普通充值',
     // 	'number' => ,
     // 	'flow_direction' => 1,
     // 	'user_type' => 1
     // ]);
     // 普通充值
     FeeType::create(['category' => '10', 'item' => '0', 'number' => 15, 'flow_direction' => 1, 'user_type' => 0]);
     FeeType::create(['category' => '20', 'item' => '0', 'number' => 15, 'flow_direction' => 1, 'user_type' => 0]);
     FeeType::create(['category' => '20', 'item' => '1', 'number' => 20, 'flow_direction' => 1, 'user_type' => 1]);
     FeeType::create(['category' => '30', 'item' => '0', 'number' => 15, 'flow_direction' => 1, 'user_type' => 0]);
     FeeType::create(['category' => '30', 'item' => '1', 'number' => 20, 'flow_direction' => 1, 'user_type' => 1]);
 }
Exemplo n.º 2
0
 /**
  * 插入随机数据
  */
 protected function create_fee_types()
 {
     if (FeeType::all()->count() == 0) {
         FeeType::create(['category' => '10', 'item' => '0', 'number' => 15, 'flow_direction' => 1, 'user_type' => 0]);
         FeeType::create(['category' => '20', 'item' => '0', 'number' => 15, 'flow_direction' => 1, 'user_type' => 0]);
         FeeType::create(['category' => '20', 'item' => '1', 'number' => 20, 'flow_direction' => 1, 'user_type' => 1]);
         FeeType::create(['category' => '30', 'item' => '0', 'number' => 15, 'flow_direction' => 1, 'user_type' => 0]);
         FeeType::create(['category' => '30', 'item' => '1', 'number' => 20, 'flow_direction' => 1, 'user_type' => 1]);
     }
 }