PHP code example of endroid / flusher

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

    

endroid / flusher example snippets


$flusher = new Flusher($manager);

for ($n = 1; $n <= 50000; $n++) {
    $task = new Task();
    $task->setName('Task '.$n);
    $manager->persist($task);
    $flusher->flush();
}

$flusher->finish();