Factory Twig Extension
https://fakerphp.github.io/formatters/
word()words($words = 3, $asString = false)sentence($words = 6, $exact = true)sentences($sentences = 3, $asString = false)paragraph($sentencses = 3, $exact = true)paragraphs($paragraphs = 3, $asString = false)text($maxChars = 200)
realText($maxNbChars = 200, $indexSize = 2)realTextBetween($minNbChars = 160, $maxNbChars = 200, $indexSize = 2)
styledtext($minParagraphs = 3, $maxParagraphs = 6, $includeLists = true, $includeHeadings = false)Images
Section titled “Images”imageUrl($width = 640, $height = 480): stringimage($width = 640, $height = 480): stringimageBlur($width = 640, $height = 480, $blur = 10): stringimageBW($width = 640, $height = 480): stringimageBWBlur($width = 640, $height = 480, $blur = 10): stringimageText($width = 640, $height = 480, $textSize = 200, $bgColor = 'f8f8f8', $textColor = null, $text = null): stringimageShapes($width = 640, $height = 480, $bgColor = 'f8f8f8'): stringGallery
Section titled “Gallery”gallery($count = 3, $width = 640, $height = 480): stringgalleryBlur($count = 3, $width = 640, $height = 480, $blur = 10): stringgalleryBW($count = 3, $width = 640, $height = 480): stringgalleryBWBlur($count = 3, $width = 640, $height = 480, $blur = 10): stringgalleryText($count = 3, $width = 640, $height = 480, $textSize = 200, $bgColor = 'f8f8f8', $textColor = null, $text = null): stringgalleryShapes($count = 3, $width = 640, $height = 480, $bgColor = 'f8f8f8'): stringfactory.tags($min = 0, $max = 4, array $choices = []): arrayPerson
Section titled “Person”title($gender = null|'male'|'female') // 'Ms.'titleMale() // 'Mr.'titleFemale() // 'Ms.'suffix() // 'Jr.'name($gender = null|'male'|'female') // 'Dr. Zane Stroman'firstName($gender = null|'male'|'female') // 'Maynard'firstNameMale() // 'Maynard'firstNameFemale() // 'Rachel'lastName() // 'Zulauf'Address
Section titled “Address”cityPrefix() // 'Lake'secondaryAddress() // 'Suite 961'state() // 'NewMexico'stateAbbr() // 'OH'citySuffix() // 'borough'streetSuffix() // 'Keys'buildingNumber() // '484'city() // 'West Judge'streetName() // 'Keegan Trail'streetAddress() // '439 Karley Loaf Suite 897'postcode() // '17916'address() // '8888 Cummings Vista Apt. 101, Susanbury, NY 95473'country() // 'Falkland Islands (Malvinas)'latitude($min = -90, $max = 90) // 77.147489longitude($min = -180, $max = 180) // 86.211205Phone Numbers
Section titled “Phone Numbers”phoneNumber() // '827-986-5852'phoneNumberWithExtension() // '201-886-0269 x3767'tollFreePhoneNumber() // '(888) 937-7238'e164PhoneNumber() // '+27113456789'Company
Section titled “Company”catchPhrase() // 'Monitored regional contingency'bs() // 'e-enable robust architectures'company() // 'Bogan-Treutel'companySuffix() // 'and Sons'jobTitle() // 'Cashier'Internet
Section titled “Internet”email() // 'tkshlerin@collins.com'safeEmail() // 'king.alford@example.org'freeEmail() // 'bradley72@gmail.com'companyEmail() // 'russel.durward@gibson.info'freeEmailDomain() // 'gmail.com'safeEmailDomain() // 'example.org'userName() // 'wade.walter'password($minLength = 6, $maxLength = 20) // 'fY4f*Zd5'domainName() // 'wolff.info'domainWord() // 'feeney'tld() // 'biz'url() // 'http://www.skilesmccullough.org/'slug($nbWords = 6, $variableNbWords = true) // 'aut-repudiandae-ut-nam-assumenda-et'ipv4() // '109.133.32.252'ipv6() // 'e48e:c003:f51e:ac71:2b55:6e67:3b7f:f93f'localIpv4() // '192.168.0.25'macAddress() // '01:02:03:04:05:06'userAgent() // 'Mozilla/5.0 (Windows CE) AppleWebKit/5350...'Date and Time
Section titled “Date and Time”unixTime($max = 'now') // 1502284496dateTime($max = 'now') // DateTime('1977-04-15 05:40:10')dateTimeAD($max = 'now') // DateTime('1553-01-19 12:44:43')iso8601($max = 'now') // '1972-11-14T07:44:50+0000'date($format = 'Y-m-d', $max = 'now') // '1979-06-09'time($format = 'H:i:s', $max = 'now') // '20:49:42'dateTimeBetween($startDate = '-30 years', $endDate = 'now') // DateTimedateTimeInInterval($date = '-30 years', $interval = '+5 days') // DateTimedateTimeThisCentury($max = 'now') // DateTimedateTimeThisDecade($max = 'now') // DateTimedateTimeThisYear($max = 'now') // DateTimedateTimeThisMonth($max = 'now') // DateTimeamPm($max = 'now') // 'pm'dayOfMonth($max = 'now') // '04'dayOfWeek($max = 'now') // 'Friday'month($max = 'now') // '06'monthName($max = 'now') // 'January'year($max = 'now') // '1999'century() // 'VI'timezone() // 'Europe/Paris'Numbers
Section titled “Numbers”randomNumber($nbDigits = null, $strict = false) // 79907610randomFloat($nbMaxDecimals = null, $min = 0, $max = null) // 48.8932numberBetween($min = 1000, $max = 9000) // 8567randomDigit() // 7randomDigitNotNull() // 5randomLetter() // 'b'randomElements($array = ['a','b','c'], $count = 1, $allowDuplicates = false) // ['c']randomElement($array = ['a','b','c']) // 'b'numerify($string = '###') // '609'lexify($string = '????') // 'wgts'bothify($string = '## ??') // '42 jz'asciify($string = '****') // '@rg('regexify($string = '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}') // 'SM0@P7.CO'Lorem Ipsum
Section titled “Lorem Ipsum”word() // 'aut'words($nb = 3, $asText = false) // ['porro', 'sed', 'magni'] or 'porro sed magni'sentence($nbWords = 6, $variableNbWords = true) // 'Sit vitae voluptas sint non voluptates.'sentences($nb = 3, $asText = false) // Array or string of sentencesparagraph($nbSentences = 3, $variableNbSentences = true) // 'Ut ab voluptas...'paragraphs($nb = 3, $asText = false) // Array or string of paragraphstext($maxNbChars = 200) // 'Fuga totam reiciendis qui architecto...'Miscellaneous
Section titled “Miscellaneous”boolean($chanceOfGettingTrue = 50) // truemd5() // 'de99a620c50f2990e87144735cd357e7'sha1() // 'f08e7f04ca1a413807ebc47551a40a20a0b4de5c'sha256() // 'b5d86317c2a144cd04d0d7c03b2b02666fcd5c20a0b4de5c'locale() // 'pt_BR'countryCode() // 'UK'languageCode() // 'ru'currencyCode() // 'EUR'emoji() // '😁'hexColor() // '#fa3cc2'rgbColor() // '0,255,122'rgbColorAsArray() // [0,255,122]rgbCssColor() // 'rgb(0,255,122)'safeHexColor() // '#ff6600'safeColorName() // 'fuchsia'colorName() // 'Gainsbor'hslColor() // '340,50,20'hslColorAsArray() // [340,50,20]