awcodes/

html-faker

更优秀的html模拟器。

v0.3.0 2024-04-06 14:54 UTC

This package is auto-updated.

Last update: 2024-09-08 07:20:36 UTC


README

Latest Version on Packagist Total Downloads

安装

您可以通过composer安装此包

composer require awcodes/html-faker

用法

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 required to generate the html

测试

composer test

变更日志

有关最近更改的更多信息,请参阅变更日志

贡献

有关详细信息,请参阅贡献指南

安全漏洞

请查看我们的安全策略了解如何报告安全漏洞。

致谢

许可证

MIT许可证(MIT)。有关更多信息,请参阅许可证文件