PHPackages                             darkghosthunter/lararut - 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. darkghosthunter/lararut

Abandoned → [laragear/rut](/?search=laragear%2Frut)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

darkghosthunter/lararut
=======================

RutUtils integration for Laravel

v7.0.2(4y ago)1523MITPHPPHP &gt;=7.4

Since Dec 21Pushed 4y agoCompare

[ Source](https://github.com/DarkGhostHunter/Lararut)[ Packagist](https://packagist.org/packages/darkghosthunter/lararut)[ Fund](https://paypal.me/darkghosthunter)[ Fund](https://ko-fi.com/DarkGhostHunter)[ RSS](/packages/darkghosthunter-lararut/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (7)Versions (26)Used By (0)

Package superseeded by [Laragear/Rut](https://github.com/Laragear/Rut)
======================================================================

[](#package-superseeded-by-laragearrut)

---

Lararut
=======

[](#lararut)

This package integrates the [RutUtils](https://github.com/DarkGhostHunter/RutUtils/) package, allowing manipulation of RUTs in your PHP project, with Laravel.

Additionally, it includes 6 new rules to validate RUT data conveniently.

Check the [RutUtils documentation](https://github.com/DarkGhostHunter/RutUtils/blob/master/README.md) to see all the available methods to create, generate and validate RUTs.

> **Important** This package does not validate if the RUT is from a real person, only if it's valid. If you need that kind of functionality, you should let your application interact with the [pseudo-official API](https://portal.sidiv.registrocivil.cl/usuarios-portal/pages/DocumentRequestStatus.xhtml).

Requirements
------------

[](#requirements)

- PHP 7.4 or 8.0
- Laravel 7.x or 8.x

> Check older releases for older Laravel versions.

Installation
------------

[](#installation)

Fire up Composer and require it into your project:

```
composer require darkghosthunter/lararut
```

Validation rules
----------------

[](#validation-rules)

This package includes handy rules to validate RUTs incoming from your frontend. Compared to prior versions, they're are more easy to use and understand.

All validation rules messages are translated. You can add your own translation by publishing the files:

```
php artisan vendor:publish --provider="DarkGhostHunter\Lararut\LararutServiceProvider" --tag="translations"

```

> Database rules will automatically normalize `K` verification *digit* to search in the database.

### `rut`

[](#rut)

This checks if the RUT being passed is a valid RUT string. This automatically **cleans the RUT** from anything except numbers and verification digit, and then checks if the resulting RUT is valid.

```
