LaravelPackages.net
Acme Inc.
Toggle sidebar
vesperabr/laravel-macros

A set of useful Laravel macros

184
0
1.0.2
About vesperabr/laravel-macros

vesperabr/laravel-macros is a Laravel package for a set of useful laravel macros. It currently has 0 GitHub stars and 184 downloads on Packagist (latest version 1.0.2). Install it with composer require vesperabr/laravel-macros. Discover more Laravel packages by vesperabr or browse all Laravel packages to compare alternatives.

Last updated

A set of useful Laravel macros

The vesperabr/laravel-macros package add a set of useful macros to your Laravel app.

Installation

You can install the package via composer:

$ composer require vesperabr/laravel-macros

The package will automatically register itself.

Str macros

Str::dot()

The Str::dot() method converts the given string to dot notation. This is especially useful when you need to handle form input names.

use Illuminate\Support\Str;

Str::dot('users[email]'); // users.email

Str::initials()

The Str::initials() method return the initials from a given string. The first parameter is the string and the second is the character limit.

use Illuminate\Support\Str;

Str::initials('Brenda Astin Zaion', 3); // BAZ

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments