Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

hapheus/laravel-text-spinner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Text Spinner

build PHP Composer PHP Code Sniffer PHP Unit Tests

Packagist GitHub last commit

Install

Using composer

composer require hapheus/laravel-text-spinner

Features

Spin's a set of nested strings into plain text.

Example: "Foo{Bar|Foo}" returns "FooBar" or "FooFoo".

Usage

1. Using Class

$text = '{Ehlo|Hello|Howdy} {World|Earth|You}{!|?|.}';
$textSpinner = new HAF\TextSpinner\TextSpinner();
$spinnedText = $textSpinner->spin();

2. Using Laravel Facade

$text = '{Ehlo|Hello|Howdy} {World|Earth|You}{!|?|.}';
$spinnedText = app('text-spinner')->spin($text);
$spinnedText = App::make('text-spinner')->spin($text);
$spinnedText = TextSpinner::spin($text);

Code Quality

PHP Code Sniffer PHP Unit Tests

composer test
composer check-style

About

A Laravel package to spin text.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages