https://github.com/jopacicdev/spintax
Spintax processor for Laravel 4
https://github.com/jopacicdev/spintax
Last synced: 3 months ago
JSON representation
Spintax processor for Laravel 4
- Host: GitHub
- URL: https://github.com/jopacicdev/spintax
- Owner: jopacicdev
- License: mit
- Created: 2014-04-05T08:26:19.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2018-01-11T09:39:36.000Z (over 8 years ago)
- Last Synced: 2025-12-14T18:27:13.130Z (6 months ago)
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Spintax string processor for Laravel 4
===============
### Installation
To include this package in your project, require it in your `composer.json` file using
```
"jopacicdev/spintax": "dev-master"
```
Afterwards, include service provider and alias in `app/config/app.php`:
```
'Jopacicdev\Spintax\SpintaxServiceProvider',
```
and
```
'Spintax' => 'Jopacicdev\Spintax\Facades\Spintax',
```
and you're all set!
### Usage
Pass your spintax string as a parameter of `process` method:
```
Spintax::process('{Hi|Hello|Howdy|Hola|Hey} there {Mr|Mrs|Miss} {Smith|Jones}!');
```
### Credits
Original PHP class by Jason Davis - https://www.codedevelopr.com/