PHP code example of fridzema / faker-quotes
1. Go to this page and download the library: Download fridzema/faker-quotes 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/ */
fridzema / faker-quotes example snippets
r = Faker\Factory::create();
$faker->addProvider(new \Fridzema\FakerQuotes\QuotesProvider($faker));
echo $faker->getQuote(); // ['quote' => '...', 'author' => '...', 'category' => '...']
echo $faker->getQuoteText(); // 'Lorem ipsum dolor sit amet'
echo $faker->getQuoteAuthor(); // 'Author Name'
echo $faker->getFunnyQuote(); // ['quote' => '...', 'author' => '...', 'category' => 'funny']
echo $faker->getInspirationalQuote(); // ['quote' => '...', 'author' => '...', 'category' => 'inspirational']