PHPackages                             tylercd100/laravel-placeholders - 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. tylercd100/laravel-placeholders

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

tylercd100/laravel-placeholders
===============================

Find and replace placeholders in a string

1.0.0(9y ago)1216.0kMITPHP ^5.5.9|^7.0

Since Mar 1Compare

[ Source](https://github.com/tylercd100/laravel-placeholders)[ Packagist](https://packagist.org/packages/tylercd100/laravel-placeholders)[ Docs](https://github.com/tylercd100/laravel-placeholders)[ RSS](/packages/tylercd100-laravel-placeholders/feed)WikiDiscussions Synced yesterday

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

Find and Replace placeholder strings in Laravel 5
=================================================

[](#find-and-replace-placeholder-strings-in-laravel-5)

[![Latest Version](https://camo.githubusercontent.com/ec5bcaad25f7151786823d5dd6177393e1cdc29cf9677e8629490cff1b541178/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f74796c657263643130302f6c61726176656c2d706c616365686f6c646572732e7376673f7374796c653d666c61742d737175617265)](https://github.com/tylercd100/laravel-placeholders/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/98b6bbe528e591b4242e58e1170ad8c915634c335b8defe432c163b3b80cad34/68747470733a2f2f7472617669732d63692e6f72672f74796c657263643130302f6c61726176656c2d706c616365686f6c646572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tylercd100/laravel-placeholders)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9449c442f917bbfe1c6addf983e12a1d851c58c5c40a5d3f646cf61e100fae28/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74796c657263643130302f6c61726176656c2d706c616365686f6c646572732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tylercd100/laravel-placeholders/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/bfbee5827d5857e13c0b37be81eee7030bab90de93dcfcf266b1ffd9900ba8ce/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74796c657263643130302f6c61726176656c2d706c616365686f6c646572732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tylercd100/laravel-placeholders/?branch=master)[![Dependency Status](https://camo.githubusercontent.com/1c4ac926efb90f2924bb989040a5bf7eedb5476ed59563195a7d1ed8141ed7fb/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3536663332353263333536333065303032396462303138372f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/56f3252c35630e0029db0187)[![Total Downloads](https://camo.githubusercontent.com/4938e9736324190ca7e41c8efef284a04f653e621288bc13117f3707dfc75c00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74796c657263643130302f6c61726176656c2d706c616365686f6c646572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tylercd100/laravel-placeholders)

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

[](#installation)

Install via [composer](https://getcomposer.org/) - In the terminal:

```
composer require tylercd100/laravel-placeholders
```

Now add the following to the `providers` array in your `config/app.php`

```
Tylercd100\Placeholders\ServiceProvider::class
```

and this to the `aliases` array in `config/app.php`

```
"Placeholders" => Tylercd100\Placeholders\Facades\Placeholders::class,
```

Then you will need to run these commands in the terminal in order to copy the config file

```
php artisan vendor:publish --provider="Tylercd100\Placeholders\ServiceProvider"
```

Usage
-----

[](#usage)

```
use Placeholders;

// Basic
Placeholders::parse("I like [fruit]s and [veg]s", [
	'fruit' => 'orange',
	'veg' => 'cucumber'
]); //I like oranges and cucumbers

// Globally
Placeholders::set("fruit", "apple");
Placeholders::set("veg", "carrot");
Placeholders::parse("I like [fruit]s and [veg]s"); // I like apples and carrots
```

### Style

[](#style)

```
// Change the style
Placeholders::setStyle("{{", "}}");
Placeholders::parse("I like {{fruit}}s and {{veg}}s", [
	'fruit' => 'lemon',
	'veg' => 'string bean'
]); //I like lemons and string beans
```

### Errors

[](#errors)

```
// Throw an error if one is missed
Placeholders::setThorough(true) // This is the default
Placeholders::parse("I like [fruit]s and [veg]s", [
	'fruit' => 'orange',
]); //Throws an Exception: Could not find a replacement for [veg]
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Unknown

Total

1

Last Release

3408d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d0f17a08e8038aafdd451317206dda9429dfda2c7cbadb0c0796e25367108d5?d=identicon)[tylercd100](/maintainers/tylercd100)

---

Top Contributors

[![tylercd100](https://avatars.githubusercontent.com/u/4522226?v=4)](https://github.com/tylercd100 "tylercd100 (5 commits)")

---

Tags

laraveltylercd100placeholders

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tylercd100-laravel-placeholders/health.svg)

```
[![Health](https://phpackages.com/badges/tylercd100-laravel-placeholders/health.svg)](https://phpackages.com/packages/tylercd100-laravel-placeholders)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k9.6k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90128.1k](/packages/emargareten-inertia-modal)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

3614.9k](/packages/linkxtr-laravel-qrcode)[wearepixel/laravel-cart

A cart implementation for Laravel

1355.6k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

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