Skip to content

Instantly share code, notes, and snippets.

@raulfraile
Last active December 18, 2015 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raulfraile/5816283 to your computer and use it in GitHub Desktop.
Save raulfraile/5816283 to your computer and use it in GitHub Desktop.
<?php
public function load(ObjectManager $manager)
{
$jokes = array(
'There’s no place like 127.0.0.1',
'If at first you don’t succeed; call it version 1.0',
'You know it’s love when you memorize her IP number to skip DNS overhead',
'Beware of programmers that carry screwdrivers',
'What color do you want that database?'
);
foreach ($jokes as $item) {
$joke = new Joke();
$joke->setContent($item);
$manager->persist($joke);
}
$manager->flush();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment