PHP code example of trendwerk / faker
1. Go to this page and download the library: Download trendwerk/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/ */
trendwerk / faker example snippets yaml
Trendwerk\Faker\Entity\Post:
post{1..100}:
post_content: <paragraphs(4, true)>
post_title: '<sentence()>'
yaml
Trendwerk\Faker\Entity\Post:
post{1..100}:
post_title: '<sentence()>'
post_type: 'testimonials'
yaml
Trendwerk\Faker\Entity\Post:
post{1..100}:
post_content: <paragraphs(3, true)>
post_title: '<sentence()>'
terms:
category: <terms('category', 1)>
post_tag: <terms('post_tag', 7)>
yaml
Trendwerk\Faker\Entity\Post:
post{1..100}:
post_content: <paragraphs(3, true)>
post_title: '<sentence()>'
acf:
name: '<name()>'
address: '<address()>'
yaml
Trendwerk\Faker\Entity\Post:
post{1..100}:
post_content: <paragraphs(3, true)>
post_title: '<sentence()>'
acf:
field_56cf2f782e9b1: '<name()>' # Name
address: '<address()>'
yaml
# user.yml
Trendwerk\Faker\Entity\User:
user{1..10}:
user_login: '<username()>'
user_pass: '<username()>'
user_email: '<email()>'
role: 'author'
yaml
# post.yml
Trendwerk\Faker\Post:
post{1..1}:
post_content: <paragraphs(3, true)>
post_title: '<sentence()>'
post_author: '@user*->id'
meta:
_thumbnail_id: '@image*->id'