dev-master
9999999-dev
The Requires
by Joseph Ralph
1.0.1
1.0.1.0
The Requires
by Joseph Ralph
1.0.0
1.0.0.0
The Requires
by Joseph Ralph
Wallogit.com
2017 © Pedro Peláez
A simple plugin for Lablog (or twig stand-alone)., (*1)
Installation is done via composer packages., (*2)
To install, simply add the following to your composer.json file., (*3)
...
"require": {
...
"lablog/stringy": "1.0.*"
...
}
...
To use the stringy filters with Laravel 4 and LaBlog, just add the service provider to your app/config/app.php providers list., (*4)
Note: The provider must be added after the Laravel 4 Twig Bridge provider. Note2: If you have LaBlog up and running, you will have already added the Twig Bridge provider., (*5)
...
'Lablog\Stringy\StringyServiceProvider'
...
To use the stringy filters with a stand-along, non-laravel bridged twig, just add the following to your twig extensions., (*6)
'Lablog\Stringy\Twig\StringyLoader'
Note: This has not been tested!, (*7)
To use the stringy filters in a template, simply use the name of any of the stringy functions as a filter., (*8)
<!-- Other Code -->
<!-- Ensure the string has http:// to the left. -->
{{ string | ensureLeft('http://') }}
<!-- Output the 6th character of the string, starting from 0. -->
{{ string | at(6) }}
<!-- Other Code -->
Please see the official twig github page for a full list of functions., (*9)