1. Go to this page and download the library: Download dlnsk/faker-sequence library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dlnsk / faker-sequence example snippets
public function setUp(): void {
...
$faker = app(\Faker\Generator::class);
$faker->initSequence('seq_name', ['one', 'two']);
}
# When installed via composer
ate();
$faker->addProvider(new \Dlnsk\Faker\SequenceProvider($faker));
$faker->initSequence(
$name, // Sequence name. You can use number of sequences simultaneously
$start = 0, // Starting value
$step = 1, // Sequence step, may be positive or negative
$bound = null, // Value that can be reached
$loop = false // Loop sequence or throw the exception NoMoreException on the bound
);
$faker->initSequence(
$name, // Sequence name. You can use number of sequences simultaneously
$collection, // Array or iterable object
$loop = false // Loop sequence or throw the exception NoMoreException on the end
);