PHPackages                             thelzf/larakit - 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. thelzf/larakit

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

thelzf/larakit
==============

A set of helpers and utilities for Laravel projects.

v1.0.1(5mo ago)04MITPHPPHP ^7.4|^8.0

Since Dec 3Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/thelzf/larakit)[ Packagist](https://packagist.org/packages/thelzf/larakit)[ RSS](/packages/thelzf-larakit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Larakit
=======

[](#larakit)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/3753a5e7fb079d23b5b5cc36fa686be01c40abfb44b4100d881a34f86ef030fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7468656c7a662f6c6172616b69742e737667)](https://packagist.org/packages/thelzf/larakit)[![Latest Stable Version](https://camo.githubusercontent.com/4383ffc8a70e5fe149dc00e71fcdf59fd473eb2547673c8478c4afcffa7492cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468656c7a662f6c6172616b69742e737667)](https://packagist.org/packages/thelzf/larakit)

A collection of Brazilian-focused helpers and utilities for Laravel. Useful functions for rapid development with a focus on the Brazilian market.

📦 Installation
--------------

[](#-installation)

```
composer require thelzf/larakit
Laravel will automatically discover the ServiceProvider (Auto-discovery).
```

### 🚀 Quick Start

[](#-quick-start)

### Date Helpers

[](#date-helpers)

```
use Larakit\Helpers\Date\Age;

// Check if older than 18 years
isOlderThan('1990-05-15', 18); // true

// Format date in Brazilian format
formatDate('2024-12-03', 'd/m/Y'); // 03/12/2024

// Human-readable date
humanDate('2024-12-01'); // 2 days ago
```

### Brazilian Masks

[](#brazilian-masks)

```
// Apply common Brazilian masks
maskCpf('12345678909'); // 123.456.789-09
maskCnpj('12345678000195'); // 12.345.678/0001-95
maskPhone('11999999999'); // (11) 99999-9999
```

### Number Formatting

[](#number-formatting)

```
// Format numbers in Brazilian format
numberFormatBr(1234.56); // 1.234,56
currencyBr(1234.56); // R$ 1.234,56
```

### Array Helpers

[](#array-helpers)

```
// Array manipulation
arrayFirstKey(['a' => 1, 'b' => 2]); // 'a'
arraySortBy($array, 'name'); // Sort by specific key
```

### 📚 Complete Documentation

[](#-complete-documentation)

Date Helpers
------------

[](#date-helpers-1)

`isOlderThan(string $date, int $age): bool`

Checks if a birth date is greater than a specific age.

```
isOlderThan('2006-05-15', 18); // false (not yet 18)
isOlderThan('2000-05-15', 18); // true
formatDate(string $date, string $format = 'd/m/Y'): string
```

Formats a date in Brazilian format or custom format.

```
formatDate('2024-12-03'); // 03/12/2024
formatDate('2024-12-03', 'Y-m-d'); // 2024-12-03
```

`humanDate(string $date): string`

Returns date in human-readable format (e.g., "2 days ago", "1 month ago").

```
humanDate('2024-12-01'); // 2 days ago
humanDate('2024-11-01'); // 1 month ago
```

### Mask Helpers

[](#mask-helpers)

`maskCpf(string $cpf): string`

Formats CPF in Brazilian format.

```
maskCpf('12345678909'); // 123.456.789-09
```

`maskCnpj(string $cnpj): string`

Formats CNPJ in Brazilian format.

```
maskCnpj('12345678000195'); // 12.345.678/0001-95
```

`maskPhone(string $phone): string`

Formats Brazilian phone numbers.

```
maskPhone('11999999999'); // (11) 99999-9999
maskPhone('1133334444'); // (11) 3333-4444
```

### Number Helpers

[](#number-helpers)

`numberFormatBr(float $number, int $decimals = 2): string`

Formats numbers in Brazilian format.

```
numberFormatBr(1234.56); // 1.234,56
numberFormatBr(1234.5678, 4); // 1.234,5678
```

`currencyBr(float $value, string $symbol = 'R$'): string`

Formats monetary values in Brazilian format.

```
currencyBr(1234.56); // R$ 1.234,56
currencyBr(1234.56, '$'); // $ 1.234,56
```

### 🔧 Manual Configuration (Optional)

[](#-manual-configuration-optional)

If auto-discovery doesn't work, add manually to config/app.php:

```
'providers' => [
    // ...
    Larakit\LarakitServiceProvider::class,
],
```

### 🤝 Contributing

[](#-contributing)

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

### 📄 License

[](#-license)

This project is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details.

### 👤 Author

[](#-author)

***Luiz Felipe de Lima Scapolan***

GitHub: [@thelzf](https://github.com/thelzf)

### ⭐ Support

[](#-support)

If this package was useful to you, leave a ⭐ on [GitHub](https://github.com/thelzf/larakit)!

### 📦 Changelog

[](#-changelog)

All notable changes will be documented in the [CHANGELOG.md](/CHANGELOG.md) file.

*Tip:* For a complete list of all available functions, check the documentation in each file in the `src/Helpers/` folder.

```
## **For Packagist publishing:**

1. **Go to:** https://packagist.org/login (use GitHub login)
2. **Click:** "Submit" at the top
3. **Paste your repository URL:** `https://github.com/thelzf/larakit`
4. **Click:** "Check"
5. **If everything is OK, click:** "Submit"

Your package will be automatically updated whenever you push to GitHub if you set up the webhook.
```

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance77

Regular maintenance activity

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

156d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0954a381fa108be229e43c7995b310f650fe235ee55b03e2077a88b94fe55f0?d=identicon)[thelzf](/maintainers/thelzf)

---

Top Contributors

[![thelzf](https://avatars.githubusercontent.com/u/54382733?v=4)](https://github.com/thelzf "thelzf (15 commits)")

---

Tags

brasilbrasileirobrazilhelperlaravelpackagephputilitieslaravelhelperhelperspackageutilitiesbrasilbrazilian

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thelzf-larakit/health.svg)

```
[![Health](https://phpackages.com/badges/thelzf-larakit/health.svg)](https://phpackages.com/packages/thelzf-larakit)
```

PHPackages © 2026

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