PHP code example of adlarge / fixtures-documentation-bundle
1. Go to this page and download the library: Download adlarge/fixtures-documentation-bundle 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/ */
adlarge / fixtures-documentation-bundle example snippets
$john = (new Customer())
->setFirstname('John')
->setLastname('Doe')
->setEmail('[email protected]');
$manager->persist($john);
$product = (new Product())
->setName("Product 1")
->setCategory("Category 1")
->setOwner($john)
->setTags(['tag1', 'tag2']);
$manager->persist($product);
$product = (new Product())
->setName("Product 2")
->setCategory("Category 2")
->setOwner($john)
->setTags(['tag2', 'tag2', 'tag3']);
$manager->flush();