1. Go to this page and download the library: Download dummify/dummify.php 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/ */
dummify / dummify.php example snippets
// Use an array of parameters to connect to a database
$connection = ['driver' => 'sqlite', 'database' => ':memory:'];
// You may populate your database with dummy data
$faker = Faker\Factory::create();
Dummify::connectTo($connection)
->from('users')
->insert(function($row) {
$row->name = $faker->name;
$row->email = $faker->email;
return $row;
});
// Or you can dummify with a new rule
Dummify::connectTo($connection)
->from('users', function ($query) {
return $query->where('email', '[email protected]'); // (Optional)
})
->update(function ($row) {
$row->email = '[email protected]';
return $row;
})