PHPackages                             wardenyarn/loripsum - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wardenyarn/loripsum

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wardenyarn/loripsum
===================

Simple https://loripsum.net API helper

1.3.1(2y ago)117MITPHPPHP ^7.2 || ^8.0

Since Oct 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/three-cos/loripsum)[ Packagist](https://packagist.org/packages/wardenyarn/loripsum)[ Docs](https://github.com/three-cos/loripsum)[ RSS](/packages/wardenyarn-loripsum/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (6)Used By (0)

Loripsum
========

[](#loripsum)

Simple  API helper

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require wardenyarn/loripsum
```

Usage
-----

[](#usage)

```
use Wardenyarn\Loripsum\Loremipsum;
use Wardenyarn\Loripsum\Enums\Option;

$lorem = new LoremIpsum();

$result = $lorem
    ->with([
        Option::HEADERS,
        Option::UNORDERED_LIST,
        Option::BLOCKQUOTE,
    ])
    ->long()
    ->paragraphs(10)
    ->withImages() // insert random images from placeholder.com
    ->html(); // html with 10 long paragraphs with headings (h1-h6), unordered lists and blockquotes

// OR

$lorem->random($max_paragraphs = 10)->html(); // html with randomly applied options and size
```

`with()` Options
----------------

[](#with-options)

```
Wardenyarn\Loripsum\Enums\Option::AVAILABLE_OPTIONS; // Array of available options
```

- `Option::DECORATE` - Add bold, italic and marked text.
- `Option::LINK` - Add links.
- `Option::UNORDERED_LIST` - Add unordered lists.
- `Option::ORDERED_LIST` - Add numbered lists.
- `Option::DESCRIPTION_LIST` - Add description lists.
- `Option::BLOCKQUOTE` - Add blockquotes.
- `Option::CODE` - Add code samples.
- `Option::HEADERS` - Add headers (h1-h6).
- `Option::AS_PLAINTEXT` - Return result as plain text.
- `Option::ALL_CAPS` - Return result in all uppercase letters.
- `Option::PRUDE` - Avoid potentially offensive Latin words (applied as default, you can disable it with `notPrude()` method)

```
use Wardenyarn\Loripsum\Loremipsum;
use Wardenyarn\Loripsum\Enums\Option;

$lorem = new LoremIpsum();

$result = $lorem
    ->with([
        Option::DECORATE,
        Option::LINK,
        Option::UNORDERED_LIST,
        ...
    ])
    ->html();
```

Sizes
-----

[](#sizes)

```
Wardenyarn\Loripsum\Enums\Size::AVAILABLE_SIZES; // Array of available sizes
```

- `Size::SHORT`
- `Size::MEDIUM`
- `Size::LONG`
- `Size::VERY_LONG`

```
use Wardenyarn\Loripsum\Loremipsum;
use Wardenyarn\Loripsum\Enums\Size;

$lorem = new LoremIpsum();

$result = $lorem
    ->short()
    ->medium()
    ->long()
    ->verylong()
    // OR
    ->size(Size::SHORT)
    ->html();
```

Images
------

[](#images)

```
use Wardenyarn\Loripsum\Loremipsum;

$lorem = new LoremIpsum();

$result = $lorem
    ->withImages() // insert random images from placeholder.com
    ->imageChance(60) // Probability percent of inserting image after DOM node; Default: 30%
    ->html();

$result = $lorem
    ->withImages(['/src/1.jpg', '/src/2.jpg']) // Will use given images first
    ->html();
```

Misc
----

[](#misc)

```
use Wardenyarn\Loripsum\Loremipsum;

$lorem = new LoremIpsum();

$result = $lorem
    ->notPrude() // Will use potentially offensive Latin words
    ->html();

$result = $lorem
    ->allcaps() // Will uppercase all output
    ->html();

$result = $lorem->plaintext(); // Will strip tags
```

Trait
-----

[](#trait)

```
use Wardenyarn\Loripsum\WithLoremIpsum;

class Example
{
    use WithLoremIpsum;

    function factory()
    {
        return [
            'body' = $this->loremIpsum() // returns an instance of Wardenyarn\Loripsum\Loremipsum
                ->random()
                ->html(),
            ...
        ]
    }
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~164 days

Total

5

Last Release

1058d ago

PHP version history (3 changes)1.0PHP ^5.6|^7.4|^8.0

1.1PHP ^7.2.5 || ^8.0

1.3.1PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a83548c16b634397f088cede03f6cdc43590e0ac82a4561d2993f001e8e2c9e?d=identicon)[WardenYarn](/maintainers/WardenYarn)

---

Top Contributors

[![three-cos](https://avatars.githubusercontent.com/u/10752823?v=4)](https://github.com/three-cos "three-cos (11 commits)")

---

Tags

loripsumwardenyarn

### Embed Badge

![Health badge](/badges/wardenyarn-loripsum/health.svg)

```
[![Health](https://phpackages.com/badges/wardenyarn-loripsum/health.svg)](https://phpackages.com/packages/wardenyarn-loripsum)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[spatie/crawler

Crawl all internal links found on a website

2.8k18.5M67](/packages/spatie-crawler)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[sproutcms/cms

Enterprise content management and framework

242.5k4](/packages/sproutcms-cms)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49617.1k](/packages/blackfire-player)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M343](/packages/drupal-core-dev)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
