PHP code example of arraypress / wp-faker

1. Go to this page and download the library: Download arraypress/wp-faker 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/ */

    

arraypress / wp-faker example snippets


use ArrayPress\Faker\Fake;

$customer = [
	'name'         => Fake::name(),
	'email'        => Fake::email(),
	'country'      => Fake::country(),
	'total_spent'  => Fake::price(),
	'status'       => Fake::weighted( [
		'active'   => 60,
		'pending'  => 20,
		'inactive' => 20,
	] ),
	'date_created' => Fake::past_date(),
];