public function createExampleByType($type)
    {
        $faker = Faker::create();

        $typeArray = [
            'bigIncrements' => 1,
            'increments' => 1,
            'string' => $faker->word,
            'boolean' => 1,
            'binary' => implode(" ", $faker->words(10)),
            'char' => 'a',
            'ipAddress' => '192.168.1.1',
            'macAddress' => 'X1:X2:X3:X4:X5:X6',
            'json' => json_encode(['json' => 'test']),
            'text' => implode(" ", $faker->words(4)),
            'longText' => implode(" ", $faker->sentences(4)),
            'mediumText' => implode(" ", $faker->sentences(2)),
            'dateTime' => date('Y-m-d h:i:s'),
            'date' => date('Y-m-d'),
            'time' => date('h:i:s'),
            'timestamp' => time(),
            'float' => 1.1,
            'decimal' => 1.1,
            'double' => 1.1,
            'integer' => 1,
            'bigInteger' => 1,
            'mediumInteger' => 1,
            'smallInteger' => 1,
            'tinyInteger' => 1,
        ];

        if (isset($typeArray[$type])) {
            return $typeArray[$type];
        }

        return 1;
    }
public function createExampleByType($type)
    {
        $faker = Faker::create();

        $typeArray = [
            'bigIncrements' => 1,
            'increments' => 1,
            'string' => $faker->word,
            'boolean' => 1,
            'binary' => implode(" ", $faker->words(10)),
            'char' => 'a',
            'ipAddress' => '192.168.1.1',
            'macAddress' => 'X1:X2:X3:X4:X5:X6',
            'json' => json_encode(['json' => 'test']),
            'text' => implode(" ", $faker->words(4)),
            'longText' => implode(" ", $faker->sentences(4)),
            'mediumText' => implode(" ", $faker->sentences(2)),
            'dateTime' => date('Y-m-d h:i:s'),
            'date' => date('Y-m-d'),
            'time' => date('h:i:s'),
            'timestamp' => time(),
            'float' => 1.1,
            'decimal' => 1.1,
            'double' => 1.1,
            'integer' => 1,
            'bigInteger' => 1,
            'mediumInteger' => 1,
            'smallInteger' => 1,
            'tinyInteger' => 1,
        ];

        if (isset($typeArray[$type])) {
            return $typeArray[$type];
        }

        return 1;
    }
public function createExampleByType ( $ type ) { $ faker = Faker :: create ( ) ; $ typeArray = [ 'bigIncrements' => 1 , 'increments' => 1 , 'string' => $ faker -> word , 'boolean' => 1 , 'binary' => implode ( " " , $ faker -> words ( 10 ) ) , 'char' => 'a' , 'ipAddress' => '192.168.1.1' , 'macAddress' => 'X1:X2:X3:X4:X5:X6' , 'json' => json_encode ( [ 'json' => 'test' ] ) , 'text' => implode ( " " , $ faker -> words ( 4 ) ) , 'longText' => implode ( " " , $ faker -> sentences ( 4 ) ) , 'mediumText' => implode ( " " , $ faker -> sentences ( 2 ) ) , 'dateTime' => date ( 'Y-m-d h:i:s' ) , 'date' => date ( 'Y-m-d' ) , 'time' => date ( 'h:i:s' ) , 'timestamp' => time ( ) , 'float' => 1.1 , 'decimal' => 1.1 , 'double' => 1.1 , 'integer' => 1 , 'bigInteger' => 1 , 'mediumInteger' => 1 , 'smallInteger' => 1 , 'tinyInteger' => 1 , ] ; if ( isset ( $ typeArray [ $ type ] ) ) { return $ typeArray [ $ type ] ; } return 1 ; }
Create an example by type for table definitions.

@param string $type

@return mixed
Create an example by type for table definitions .