<?php

namespace Zizaco\FactoryMuff\Kind;

use Zizaco\FactoryMuff\Kind;

class Integer extends Kind
{
  public function generate()
  {
    $length = (int) $this->getOption(0, 5);
    $faker = \Faker\Factory::create();
    return $faker->randomNumber($length);
  }
}
<?php

namespace Zizaco\FactoryMuff\Kind;

use Zizaco\FactoryMuff\Kind;

class Integer extends Kind
{
  public function generate()
  {
    $length = (int) $this->getOption(0, 5);
    return $this->randomNumber($length);
  }

  private function randomNumber($length)
  {
    $integer = null;
    for($i = 0; $i < $length; $i++) {
      $integer .= mt_rand(1, 9);
    }

    return (int) $integer;
  }
}
Use mt_rand to generate random number. Faker broke when integers started with 0
Use mt_rand to generate random number. Faker broke when integers started with 0
