PHP code example of awcodes / html-faker

1. Go to this page and download the library: Download awcodes/html-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/ */

    

awcodes / html-faker example snippets


use Awcodes\HtmlFaker\HtmlFaker;

HtmlFaker::make()
    ->heading(int | string | null $level = 2)
    ->paragraphs(int $count = 1, bool $withRandomLinks = false)
    ->unorderedList(int $count = 1)
    ->orderedList(int $count = 1)
    ->image(int $width = 640, int $height = 480, string $text = null)
    ->link(string $text = null, string $url = null)
    ->video(?string $provider = 'youtube', ?int $width = 640, ?int $height = 480)
    ->details()
    ->code(string | null $className = 'hljs')
    ->blockquote()
    ->hr()
    ->br()
    ->table()
    ->generate(); // <-- this is