PHPackages                             manzadey/laravel-macros - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. manzadey/laravel-macros

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

manzadey/laravel-macros
=======================

Laravel Macros

v1.1.0.5(5y ago)223MITPHPPHP ^7.4|^8.0

Since Apr 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Manzadey/laravel-macros)[ Packagist](https://packagist.org/packages/manzadey/laravel-macros)[ RSS](/packages/manzadey-laravel-macros/feed)WikiDiscussions master Synced yesterday

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

Laravel String Macros
=====================

[](#laravel-string-macros)

- `declination` - склонение чисел;

```
use Illuminate\Support\Str;

Str::declination(15, ['друг', 'друга', 'друзей']); // 15 друзей
```

- `declinationRuble` - склонение суммы в рублях на основе макроса `declination`;

```
use Illuminate\Support\Str;

Str::declinationRuble(50); // 50 рублей
```

- `youtubeCodeFromUrl` - вырезать код ролика из URL YouTube;

```
use Illuminate\Support\Str;

Str::youtubeCodeFromUrl('https://www.youtube.com/watch?v=rOjHhS5MtvA'); // rOjHhS5MtvA
```

- `onlyNums` - оставить в строке только числа;

```
use Illuminate\Support\Str;

Str::onlyNums('+7 (911) 152-52-25'); // 79111525225
```

- `countLetters` - кол-во символов в строке;

```
use Illuminate\Support\Str;

Str::countLetters('Самый обычный текст'); // 19
```

- `countWords` - кол-во слов строке;

```
use Illuminate\Support\Str;

Str::countWords('Самый обычный текст'); // 3
```

- `mask` - Оборачивает текст в маску;

```
use Illuminate\Support\Str;

Str::mask('/^(\d{3})(\d{3})(\d{2})(\d{2})$/', '+7 (\1) \2-\3-\4', 9112223344); // +7 (911) 222-33-44
```

Laravel Blueprint Macros
========================

[](#laravel-blueprint-macros)

- `active` - флаг активности (boolean), по умолучанию - 0;

```
use Illuminate\Support\Facades\Schema;

Schema::create('models', function (Blueprint $table) {
    $table->active();
});
```

- `description` - поле для текста;

```
use Illuminate\Support\Facades\Schema;

Schema::create('models', function (Blueprint $table) {
    $table->description();
});
```

- `rating` - рейтинг;

```
use Illuminate\Support\Facades\Schema;

Schema::create('models', function (Blueprint $table) {
    $table->rating();
});
```

- `slug` - поле для slug;

```
use Illuminate\Support\Facades\Schema;

Schema::create('models', function (Blueprint $table) {
    $table->slug();
});
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

7

Last Release

1839d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34869211?v=4)[Andrey Manzadey](/maintainers/Manzadey)[@Manzadey](https://github.com/Manzadey)

---

Top Contributors

[![Manzadey](https://avatars.githubusercontent.com/u/34869211?v=4)](https://github.com/Manzadey "Manzadey (11 commits)")

### Embed Badge

![Health badge](/badges/manzadey-laravel-macros/health.svg)

```
[![Health](https://phpackages.com/badges/manzadey-laravel-macros/health.svg)](https://phpackages.com/packages/manzadey-laravel-macros)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
