<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\CommodityBarcode;
use Faker\Generator as Faker;

$factory->define(CommodityBarcode::class, function (Faker $faker) {
    return [
        'code' => md5(\Illuminate\Support\Str::random(8)).date('Ymd'),
        'commodity_id'=>factory(\App\Commodity::class),
    ];
});
