define(Transaction::class, function (Faker $faker) { $business_user = DB::selectOne('select business_id, user_id from business_user where level = 4 order by rand() limit 1'); return [ 'user_id' => $business_user->user_id, 'business_id' => $business_user->business_id, 'amount' => random_int(1000, 9999), 'succeeded' => $faker->boolean(), 'options' => json_encode([]), 'created_at' => Carbon::now()->subMinutes(random_int(1, 1000)), ]; });