Download the PHP package koenhendriks/laravel-str-acronym without Composer
On this page you can find all versions of the php package koenhendriks/laravel-str-acronym. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download koenhendriks/laravel-str-acronym
More information about koenhendriks/laravel-str-acronym
Files in koenhendriks/laravel-str-acronym
Package laravel-str-acronym
Short Description A package to be able to generate acronyms from strings in Laravel projects using the Str helper and supports the Stringable class.
License MIT
Homepage https://github.com/koenhendriks/laravel-str-acronym
Informations about the package laravel-str-acronym
Installation
You can install the package using Composer:
composer require koenhendriks/laravel-str-acronym
After installing the package Laravel should automatically discover the package.
If you want you can register the service provider in your Laravel application manually. You can do this by adding the service provider to the providers
array in your config/app.php
file:
Once you've registered the service provider, you can start using the acronym macro in your Laravel application.
Usage
To generate an acronym from a string, you can call the acronym method on the Str helper:
If you prefer to use the Fluent Strings, you can call the acronym method on a Stringable object:
You can also provide a delimiter string as an optional parameter to separate the acronym letters:
Testing
This package is using PhpUnit to unit test the macros. A simple alias has been created with composer to run the tests.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
This package originates from this Pull Request on the Laravel Framework
Contributors
- Corné Dorrestijn
- All Contributors
License
This package is licensed under the MIT License. See the LICENSE file for more information.
Contributing
If you find any issues with the package or have suggestions for improvements, feel free to open an issue or pull request on the GitHub repository.